jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Breuer <holger.bre...@handelshof.de>
Subject Re: JCASessionHandle - ClassCastException
Date Thu, 25 Jun 2009 12:43:12 GMT

Andreas Wallén wrote:
> Hi!
> Perhaps something like this:
> 				JCASessionHandle jcaSessionHandle = (JCASessionHandle) session;
> 				XASession xaSession = (XASession) jcaSessionHandle.getXAResource();
> 				SessionImpl sessionImpl = (SessionImpl) xaSession;
> Anyone knows a cleaner way to do this?
> Best regards,
> Andreas Wallén

Ok ... the casting works, but now I get the following error when calling

java.sql.SQLException: You cannot set autocommit during a managed

because I have a managed Connection.

When I use a MessageDrivenBean with Bean-Managed-Transaction it works
But I don't know if this is the recommended way to use the

So, please guys, what is the best-practice to get rid of unused documents in
the datastore
inside my EJB ... and not falling in such exceptions. 
View this message in context: http://www.nabble.com/JCASessionHandle---ClassCastException-tp24146837p24202537.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message