java - Stateful EJB Lifecycle question -


i have following bean declaration:

@stateful @transactionattribute(transactionattributetype.not_supported) public class interuptbean implements interrupt {  private boolean interrupt = false;  @override public boolean check() {     return interrupt; }  @override public void interrupt() {     interrupt = true; } } 

i'm trying understand stateful ejb lifecycle. once state of ejb permanently modified using interrupt() method, , references instance set null, bean instance put in eligible pool or discarded?

what makes me question judgement transactionattributetype.not_supported. hope container spec says somewhere stateful ejb reset somehow how it's initial state before being used again, not matter transactionattributetype is.

thanks!

read http://download.oracle.com/javaee/6/tutorial/doc/giplj.html#gipln.

at end of lifecycle, client invokes method annotated @remove, , ejb container calls method annotated @predestroy, if any. bean’s instance ready garbage collection.

if nobody ever calls @remove method, container wait antil timeout reached , remove it.

the @transactionattribute annotation has nothing bean's lifecycle. tells container if , when transaction should started when 1 of business methods invoked.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -