Hi

JRUN 3.0(sp2)

We are using Stateless session Bean invoking jdbc calls directly to SQLServer, 
We would like to manage transactions using JTA. 

OUr Sample Code Looks Similar to this


void MyFunction(){

Connection con;
Statement st=null;
String ret="inserted";
 try{
  UserTransaction usertrans=mySessionCtx.getUserTransaction();
  System.out.println(usertrans +"   got transaction");
   usertrans.begin();
   con=getConnection();
   st=con.createStatement();
   int h=st.executeUpdate("insert into Users(ID,Name) values(1,'vijay')");
   usertrans.rollback();
  }catch(Exception e){
   System.out.println("Exception in exdatabase " + e);
  }


}


the default-out.log is the following

allaire.ejipt._SessionContext@3cdbf6
No current transaction got transaction


We are using the Normal javax.sql.Datasource Object. Is it necessary to use a 
javax.sql.XADatasource? 
if yes how do we create it for SQLServer Database.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to