Hi,
Why do you want to use User transactions in the first place??? Let the
container handle this, thats the whole idea about EJB!!! Add a transaction
attribute (required) to the method and let the container handle the
transaction -> you are done.
Burkhard
and PLEASE don't use HTML when posting
----- Original Message -----
From: "Edward Wang" <[EMAIL PROTECTED]>
To: "JBoss" <[EMAIL PROTECTED]>
Sent: Wednesday, July 11, 2001 11:11 AM
Subject: [JBoss-user] Urgent, May someone tell me how JBoss realize a
Transaction?
> Now I am using JBoss+Tomcat 2.22 pack.
>
> I setup a Datasource that connect to SQLServer 7.0 with the JDBC Driver of
WebLogic (BEA Sys, a Type 4 Driver).
> And in my Client Class that calls an EJB (Entity), I use the
"javax.transaction.UserTransaction", it seems JBoss
> can not find the name in it's Context. Then I use a TxManager class in the
following way:
>
> TxManager tx = null;
>
> try {
> tx = org.jboss.tm.TxManager.getInstance();
> tx.begin();
>
> zee120Beanhome home = getHome();
> zee120BeanPK pk = new zee120BeanPK("001");
> zee120 cli = home.findByPK(pk);
>
> cli.remove();
>
> tx.commit();
> } catch (Exception e) {
> tx.rollback();
> }
>
> The record "001" is expected to exist in my DB still if some error occurs,
but the result is it was removed.
>
> How can I use Transaction with JBoss?
>
> Thanks for your help.
>
>
>
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user