• Post Reply Bookmark Topic Watch Topic
  • New Topic

WAS 4.0 bmp Entity Bean problem  RSS feed

 
Max Tomlinson
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all-
I've got an BMP entity bean with a findAll method (ejbFindAll) that returns a Collection (from a result set) of application objects. I call the findAll from the home interface but what I get back is a Collection of (what appear to be) stubs+objs. (These appear to be remote interface stubs+the result). I try to cast the obj down to the app obj but no success. If you look at Enterprise Java Beans (3rd edition) p281, I am doing almost exactly what the sample is doing with the findByCapacity method.
If I print out the object, I get: IOR: etc. etc.
How do I cast this to my application object? Is it not being marshalled correctly?
Also, I'm wondering how an entity bean works if there is no underlying instance (e.g. calling it with a findByCapacity type method which returns a Collection, not a specific instance.) Do I need to do an ejbCj create first?
thanks,
Max Tomlinson
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you think you should be getting back -- all that is ever returned from a finder method is a Collection of remote references (or a single remote reference). Are you saying you can't use the references in the collection? Can you post code to show your difficulty?
Kyle
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!