[jboss-user] [EJB 3.0] - Executing a

r.simoni do-not-reply at jboss.com
Wed Nov 22 06:03:24 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 required 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=3987853#3987853

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



More information about the jboss-user mailing list