Originally posted by Tomek Bo:
I've read that in this callback methods it is possible to take a reference to EJBObject throught SessionContext (table 3 page 90 in spec). But how it can be possible, if this methods are called by the container to change a size of the pool. so there is no client and no EJBObject (figure 15 and 16 on page 94). thanks in advance for help
bo
There is always an EJBObject for anything that has a remote component interface. (Local component interface as well, I believe). Just because the diagram may not show you it, each bean in a pool has an associated EJBObject. Also, ejbRemove() is called just before a bean is removed from the pool, (it's your last chance to clean it up theoretically), and at that point the EJBObject still exists for it. One more point, all objects in a pool are on the heap, and as such are real objects, they also have a partner object, the EJBObject. (Often not shown in pool diagrams for simplicity, since it's confusing to remember that the EJBObject actually stands in for the bean).
I believe this is how it works.
-jeff