Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Finder Methods  RSS feed

 
Shweta Gulati
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I have written a finder method in the Container Managed Bean. the finder method works fine if the number of matching records in the database are less but if the number of records in the database exceeds 1000 then it gives an exception --
java.rmi.NoSuchObjectException : CORBA.INV_OBJREF 0:No; Nested Exception is org.omg.CORBA.INV_OBJREF minor code :0 completed: No
Is there a restriction in the number of rows that can be returned in the enumeration? If so, then what is its alternative?
Regards,
Shweta.
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shweta Gulati,
There is no restriction placed at least by the specification on the length of the returned collection in a multi object finder. This can be found out in page 115 in the ejb spec 1.1.
However i feel that if a finder is to return a collection of more than 1000 remote references then i feel there is a problem in the programing logic. Wont this increase the network time, etc . But i cannot be sure about this. Do check out if this is indeed required.




------------------

Mahindrakar
IBM Application Server Forum Moderator
SCJP
 
Sean MacLean
author
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a paging mechanism might be in order to reduce the number of results returned each time. Just a thought.
Sean
 
Shweta Gulati
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sean and Mahindrakar,
I guess if you set the transaction attribute to REQUIRES NEW then it would work but I have yet to try it out.
Thanks a lot.
Regards,
Shweta
 
Victor Htet
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shweta,
Use Value List Handler J2EE pattern.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!