Given a Stateful Session Bean that is exposed only localy (i.e only EJBLocalHome and EJBLocalObject are defined)
is there a way to find a particular instance of the bean from a client that does not have
a refernce to to the bean's local object.
Obviously the client and the bean are on the same VM.
This can be done for a remote enabled bean by serealizing the bean's handle which is available from the EJBObject.
There is nothing similar on the EJBLocalObject interface.
Any ideas?
-
Obtaining a reference to a local bean (3 messages)
- Posted by: David Soroko
- Posted on: September 26 2001 05:44 EDT
Threaded Messages (3)
- Obtaining a reference to a local bean by Gal Binyamini on September 29 2001 16:56 EDT
- Obtaining a reference to a local bean by David Soroko on September 30 2001 08:42 EDT
- Obtaining a reference to a local bean by Gal Binyamini on September 30 2001 06:29 EDT
- Obtaining a reference to a local bean by David Soroko on September 30 2001 08:42 EDT
-
Obtaining a reference to a local bean[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: September 29 2001 16:56 EDT
- in response to David Soroko
I think I didn't get your question... For remote beans you can serialize the reference/handle. For local beans you simply pass the reference using normal Java semantics... What is the problem?
Gal -
Obtaining a reference to a local bean[ Go to top ]
- Posted by: David Soroko
- Posted on: September 30 2001 08:42 EDT
- in response to Gal Binyamini
I'd like a message driven bean (which I know to be colocated) to be able to communicate with that specific instance of a stateful session bean. This is possible with remote interfaces. My question concerns local ones.
David -
Obtaining a reference to a local bean[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: September 30 2001 18:29 EDT
- in response to David Soroko
What you are asking to do is to access the actual same instance from the MDB. This is not possible. Had you used remote interfaces, you could pass the remote ref. But this does not denote an actual instance - it denotes an entity. The container decides which instance will be associated with that entity in a specific point in time.
Passing something like a handle would not make sense, because on every VM you open the handle you will need a seperate local instance anyway. If you want your MDB to access a local instance representing an entity, pass it the PK.
Regards
Gal