• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session beans

 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I tried mock exam on ejbcertificate.com and i was confused with one question


Question : - Which one of the following statements regarding a session bean's conversational state is true?

1. Stateless and stateful session beans both maintain conversational state.
2. An object reference to the java:comp/env JNDI context that is stored in session bean's conversational state is not perserved when the session bean is passivated.
3. The conversational state of a session bean with container-managed transaction demarcation is automatically rolled back to its initial state if a system exception is thrown by a business method.
4. A session bean's conversational state can hold an open socket connection.
5. Non-transient fields of a session bean's conversational state are lost when a session bean is passivated


Correct ANSWER 4

But as far i know EJB are not allowed to use socket connections.Then how come 4 is correct ?

James
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A bean cannot be a server socket, can be a client socket. See EJB spec 24.1.2.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic