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
gc.scan():

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

because I have a managed Connection.

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

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.


Mime
View raw message