deneb wrote:
> 
> hi Rickard
> 
> thnx buddy
> i got that fine and working..
> 
> i really needed that fast but sorry for the late reply.
> also i would also ask one question:
> 
> if i have a method like in a bank
> x.withdraw(amonut)
> y.deposit(amount)
> 
> i want to maintain the user transaction so that i can commit or roll
> back
> could u guide me as to how could i do that
> 
> i have written in my descriptot that the transaction is bean managed.

Hi, 

If you absolutely want your transactions to be bean-managed you can use
the following in your session bean:

UserTransaction transaction = sessionContext.getUserTransaction();
transaction.begin();
x.withdraw(amount);
y.deposit(amount);
transaction.commit();

If you use a Connection, I think it has to be created and closed between
begin() and commit()/rollback().

There is an example of bean-managed transactions in testbeans in the
jbosstest CVS module.

HTH,

Sebastien


> 
> thnx
> deneb
> 
> Rickard Oberg wrote:
> >
> > Hi!
> >
> > > please could anyone tell me whats to be written in the jaws.xml for the
> > > finder method findAll..
> > >
> > > lets say i have a customer and i want a method in the home interface
> > > findAllCustomers()
> > >
> > > so how would i write for the corresponding in the jaws.xml
> >
> > Suggestion: let the finder be named "findAll" and do nothing more: JAWS will
> > figure out in its own that the finder should retrieve all customer :-)
> >
> > /Rickard
> >
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Problems?:           [EMAIL PROTECTED]
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to