jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreas <andr...@breakpoint.no>
Subject SV: Jackrabbit JCA and JTA
Date Thu, 05 Sep 2013 17:51:03 GMT

It seems like the Jackrabbit session commits independently of the other
code. I have no idea why. 


Fra: Chris Poulsen [via Jackrabbit]
Sendt: 5. september 2013 09:49
Til: andreas
Emne: Re: Jackrabbit JCA and JTA



I don't know about file storing vs. transactions, but I would expect it 
to work like any other transactional change to the repository. 

Getting the JTA setup correctly can be somewhat of a tricky task - Are 
you sure that you are in a transaction in your method (and that you are 
in the correct transaction)? 

Have you tried adding a simple node in the transaction method to see if 
a simple node is rolled back? Also you can usually ask spring and the 
JTA provider to produce really detailed logs to help you figure out what 
is going on. 


On 04-09-2013 18:09, andreas wrote: 

> Hi 
> I am developing an application that uses both Jackrabbit and a database.
> Jackrabbit I store the files that I upload, and the database I store all
> other data in the app. I am using Spring 3.2, Hibernate 4.x and Jackrabbit

> 2.6.2. I have downloaded the Jackrabbit JCA version and deployed it to
> 7.1.1. I have configured it correctly I think. I can upload file to it and

> it is saved. I also debugged my application and I saw that the session 
> object that invoke save() and logout() on is of type XaSession. I am using

> the datastore. 
> The way I tested my code is like this: I have one method in the service 
> layer of my app annotated with @Transactional. Inside the method I first
> a file to the content repository, then I force a RunTimeException to be 
> thrown (and the code that should run instead of the exception would be to 
> save my object to the database through Hibernate). I cleared the datastore

> (no files inside it) but when the exception is thrown the file that I
> isn't removed from the datastore. 
> So, is this correct? Does files in datastore stay in the datastore - not 
> rolled back? Or should it be removed. I am using the 
> <tx:jta-transaction-manager /> annotation in Spring config. 
> Could someone shed some light over this because I don't understand if I
> it working, or if I need to do something else to get it working? And where

> does the metadata of the file that I add get stored? I have configured a
> database for the persistence manager but I don't see anything useful in
> database tables? There are only a lot of what seems to be binary things 
> there? Is there a way to verify if a file is inserted or not in the
> even though the actual file is stored on disk (datastore)? 
> Thank you 
> - Andreas 
> -- 
> View this message in context:
> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com. 


If you reply to this email, your message will be added to the discussion


To unsubscribe from Jackrabbit JCA and JTA, click here
zMDc1MzU4> .

View this message in context: http://jackrabbit.510166.n4.nabble.com/SV-Jackrabbit-JCA-and-JTA-tp4659467.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
View raw message