Originally posted by Byron Estes:
Emil,
I appreciate the time you took explaining why you feel that "C" is a correct answer.
But...
Ponder this for a moment. Unlike stateful session beans or entity beans which are trully assigned to a client for some period of time. Stateless session beans because they have no state and are therefore considered to functionally equivalent don't really get assigned out of the pool. The container using the request interceptor mearly delegates the method call to to an available bean and returns.
Because it's never assigned, in my mind it never leaves the pool. It just performs the method. The next call from the client may go to the same stateless session bean or a different stateless session bean. It doesn't matter because they have no "identity or state".
Thoughts? Differing understandings/opinions?
Regards,
Originally posted by Byron Estes:
The answer is �D�. This is completely at the discretion of the container which may choose to physically destroy the instance or not.
Answer �A� is incorrect because the container may opt not to destroy it.
Answer �B� is incorrect. All Stateless session beans are equivalent and maintain no conversational state. They can be used by any client at any time.
Answer �C� is incorrect. This is a bit of a trick question. The instance may be destroyed, but the instance never really leaves the pool, so it can�t really be returned to it. In reality, any client can call any method on any EJB Object in the method ready pool.
Answer �E� is incorrect. The session instance could be destroyed. Also see answer �C� for explanation regarding �instance pools and stateless session beans�.
Answer �F� stateless session beans don�t have conversational state and are not passivated. This only applies to stateful session beans, not stateless session beans.
Originally posted by JiaPei Jen:
How can a transaction be coordinated with legacy systems or Java systems outside the container/server?
Originally posted by SPAD:
The returned Enumeration/Collection has the remote references that doesn't neccesarily mean that the corresponding beans have been created. The beans may be in passivated state [no resource usage] and will be activated only in case of business method invocation. Check this out in Monson's book on EJB "The Life Cycle of Entity Bean" on I think page #213 secod ed
Originally posted by Frederic Vermaut:
At my return from holiday , I was pleased to note that I succeeded parts II and III with 91%
The result went pretty fast : I passed partIII on July 3rd and the result was posted on July 15th !
I had 95% for the first part.
I lost most of the points... guess where... in the class diagram (36/44). Component diagram (43/44) and sequence diagrams (12/12).
Thanks to all the people who participated in this forum.
Frederic
SCEA
Originally posted by Nicky Moelholm:
Hi,
If you want better reuse of your user session handling you put it in the Stateful session bean. The latter makes it possible to use the logic from Swing clients etc.
Originally posted by Emil Kirschner:
it means that the EJB spex do not allow you to create a server socket and listen to it (the create/bind/listen/accept sequence) and that is beacause the thread that listens for connections on your socket would block until a connection comes in and this would prevent the app server to properly manage the available pool of threads. basically, a thread is blocked without anything usefull happening there, which is a waste of resources.
Originally posted by JiaPei Jen:
Thanks for the reply. Again, I have read somewhere says that "socket server is forbidden by EJB". I do not understand. Could anybody kindly explain it?
Originally posted by Rahul JG:
In an Entity Bean, if a finder method returns a large number of records (say
thousands of them), will thousand bean instances be created? If yes, what
happens if the number of bean instances required to be created exceed the
number of instances which have been specified to be maintained in the pool?
I know this question would have been asked many times in many forums, but I
haven't been able to get a convincing reply. Can anyone answer me?