If you look at the EJB1.1 public draft spec (the table in section 6.6.1),
you'll see that SessionContext.getUserTransaction() is allowed
in the ejbActivate method. So your EJB server vendor needs to fix this.

The UserTransaction object does not represent a handle to
a particular transaction (i.e. it is not the same as
javax.transaction.Transaction), so UserTransaction
can be made available by the container
even when there is no global transaction.

-Sanjeev Krishnan
Java Enterprise Technologies,
Sun Microsystems Inc.


> Is it not in compliance with ejb 1.0 spec to reconstruct a handle to UserTransaction 
>in the ejbActivate
> method of a stateful session bean ( Transaction attribute set to TX_BEAN_MANAGED
> ). I am getting the handle from SessionContext using getUserTransaction method.

> The problem i am facing is that whenever the container calls the ejbActivate method 
>a null pointer
> exception is been thrown from EJBContextImpl.getUserTransaction method. I talked to 
>the vendor support
> and i was told that the handle should only be obtained in business methods and what 
>i am doing is not in
> compliance with section 6.5.7 of ejb 1.0 spec. I read the section many times but 
>couldnt find any info that
> says that this could not be done. The section only mentions that ejbActivate method 
>is always called without
> a transaction i.e as per my interpretation the handle to usertransaction that i am 
>trying to obtain should
> have a status of 6 i.e Transaction not active..

> I am a bit confused on my interpretation and that of the vendor. Can anyone help me 
>out..........

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to