Hi,
I am currently reading the Head First
EJB book. I came across the following on page 228 'Bean things you can do from stateless bean methods'. The book says you can do the following:
- Use your SessionContext to get a reference to your home
-
Use your SessionContext to get a reference to your EJB object
- Access your special JNDI environment
Now the second point confuses me. There is no client associated with a stateless session bean creation. Then how come you can get a reference to your EJBObject from the ejbCreate(). Page 224 says that the EJBObject is created when the client calls create() on the home. But then the bean creation isn't tied to this call, it happens at a completely different and unrelated time.
Now I've checked up the specs for this, and section 7.8.2 says the same things as the book (rather the other way round).
So what am I missing here? I feel I have not understood something fundamental. Some help would be much appreciated.
Thanks,
Sheldon
[ June 29, 2005: Message edited by: Sheldon Fernandes ]