[jboss-user] [EJB 3.0] - Executing a jdbc statement in a session (XACT_ABORT issue)..

r.simoni do-not-reply at jboss.com
Wed Nov 22 06:28:18 EST 2006


Hi, we have a problem: 

we have a SQL Server DB with internally linked a remote oracle DB. 
We have created views in out SQL Server DB to map remote oracle tables. 
When we try an insert sql on the SQL Server Enterprise Manager on the views all run correctly. 

When we use EJB 3.0 to execute the same insert (via persist method) we receive this error: 


Unable to start a nested transaction for OLE DB provider 'MSDAORA'.  A nested transaction was requir
  | ed because the XACT_ABORT option was set to OFF"	 


we have read that linked server in sql server are provided by a Provider that if doesn't support nested transactions you have to explicitly execute a query: 

SET XACT_ABORT ON	 

How can we execute this statement in EJB 3.0? 
createQuery, createNativeQuery doesn't seem to be the solution 
How can I obtain the connection used in the "session" to run a simply JDBC statement? 
Do you have another solution? 

Thanks 
Bye 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987859#3987859

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987859



More information about the jboss-user mailing list