Santosh Kumar wrote:
>
>
> Can anyone mail me a sample non-trivial Transaction-based Stateful session.
>
> or any links to such programs.
trivial or non-trivial, the transactions work or not
... or what do you mean?
import javax.transaction.*;
[...]
public class myBean implements SessionBean {
private UserTransaction ut = null;
[...]
public void setSessionContext(SessionContext context)
throws RemoteException
{
[...]
try {
ut = ctx.getUserTransaction();
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
[...]
}
public void myMethod( )
throws [...]
{
try {
ut.begin();
...code...
ut.commit();}
} catch....
hope that helps
klaus
--
Klaus Thiele - Personal & Informatik AG
mailto:[EMAIL PROTECTED]
"There's got to be more to life than compile-and-go."