This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Timed out

 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when a business method is invoked on a bean that has timed out ?
Please help me for the question.
Ruilin
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the mock test, the answer for the following question is misleading from the test.
For a CMP Entity bean, what should the ejbCreate method return ? EJB specification) ?
According to the book I read, the answer is: null. However, the mock indicate the answer is: Remote interface.
Please comment.
Ruilin

 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Mock Exam at the following site needs to be examined and corrected for answers. Otherwise it is misleading users. http://www.stormpages.com/jnagal/mock.html
I believe the owner of the mock examine is trying to help people. I feel thankful to him/her. However, its problems need to be fixed immediately.
best regards,
Ruilin
 
Sergey Opanasets
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only bean that will timeout is statefull session bean
state "Does not exists and referenced"
"... Attempted invocations on a session object
that does not exist result in java.rmi.NoSuchObjectException...."
see Section 5.6 EJB 1.1. Specification
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you reply.
The mock examine indicates the answer is:
ObjectNotFound Exception.
 
Ajit Kumar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a stateful session bean is in the passive state and it times out, if a client makes a reference to it.
Does the container try to restore the stateful sesion bean from the stored session data or does it throw an rmi.NoSuchObject exception???
Please comment.
 
Sergey Opanasets
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My understanding is: if an object times out, it is destroyed by the container.
So it really does not matter whether it was in passivated state or not.
 
Amitabh Suman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ruilin yang:
In the mock test, the answer for the following question is misleading from the test.
For a CMP Entity bean, what should the ejbCreate method return ? EJB specification) ?
According to the book I read, the answer is: null. However, the mock indicate the answer is: Remote interface.
Please comment.
Ruilin


According to EJB spec. 1.1, ejbCreate() must return the primary key type (sec. 10.6.4).
 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys I took the partI. I did not find any question specific to EJB API, although I know it. So, don't spend time on the details. In EJB 1.1 ejbCreate() return PK. If it is CMP PK is null.
 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The mock exam your guys talking about is misleading.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic