Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.499 :

Posted: Wed May 16, 2012 3:48 pm
by prakashyaji
Just a small advice:
To be consistent with other explanations, please add following scenario as well to the explanation of option 2.

Existing is : "In case of a server crash or if a system exception is thrown from the instance’s method to the container, the remove() method will not be called."

Also mention that, @PreDestroy method is not called if Timeout occurs when stateful session bean is passivated.
I hope this helps :)
Thanks,
Prakash Yaji

Re: About Question enthuware.oce-ejbd.v6.2.499 :

Posted: Wed May 16, 2012 8:08 pm
by admin
Thank you for your suggestion. This has now been added.
-Paul.

Re: About Question enthuware.oce-ejbd.v6.2.499 :

Posted: Tue Nov 27, 2012 12:47 pm
by Christian
The MDB as displayed is actually not valid: it is not annotated with @MessageDriven, nor does it implement the MessageDrivenBean interface.

Sure, the deployment descriptor could denote it as a MessageDrivenBean, but it could also not do so.

Re: About Question enthuware.oce-ejbd.v6.2.499 :

Posted: Wed Nov 28, 2012 7:37 am
by admin
If the question says it is a MDB, it can be safely assumed that it is a MDB. Still, it has been added to avoid confusion.

thank you for your suggestion,
Paul.

Re: About Question enthuware.oce-ejbd.v6.2.499 :

Posted: Sun Jan 03, 2016 7:21 pm
by aazizi.tarik
In explanation of option 2: " @PreDestroy method is not called if Timeout occurs when stateful session bean is passivated."
How is that possible while we can't have timers on stateful session beans? Please could you clarify that to me?

Re: About Question enthuware.oce-ejbd.v6.2.499 :

Posted: Sun Jan 03, 2016 9:17 pm
by admin
This timeout is not of the timer here, it is the time the bean can remain idle for want of call from client. As per section 4.3.12:
A Bean Developer or Deployer may optionally assign a timeout value to a stateful session bean. This value is the amount of time a stateful session bean is permitted to remain idle (not receive any client invocations) before being removed by the container.
HTH,
Paul.

Re: About Question enthuware.oce-ejbd.v6.2.499 :

Posted: Mon Jan 04, 2016 5:17 am
by aazizi.tarik
Thanks Paul, another question that come in mind, in that case does the container count also the time while the bean is passivated?

Re: About Question enthuware.oce-ejbd.v6.2.499 :

Posted: Mon Jan 04, 2016 7:39 am
by admin
Yes, that is exactly why it removes the bean even it it is in passive state.