jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihai Anescu" <mane...@totalsoft.ro>
Subject RE: JBoss JTA transaction timeout
Date Mon, 02 Jul 2007 08:50:41 GMT
Hi Klaus,

It is similar, but a little different.

We have an upload method and one download method. Each one is called on it's own, opens a
session, does some stuff. The upload method will create some nodes and put the content from
a stream into a node.
The download method just retrieves one such node and returns an object "describing it" (content,
mimetype, filename). I have moved the second method into a different object, one that is not
an EJB (I made a helper class). Both mehods are called from a Home class, one that manages
the operations for one entity. And I still got the same error, for the download method only.
I even tried to add a dummy node when I do the retrieving, but the same error shows up every
I have an entity with 3 upload controls, I can upload all three files but I get the same error
for all 3 download...

We're using JackRabbit 1.3.

-----Original Message-----
From: KÖLL Claus [mailto:C.KOELL@TIROL.GV.AT] 
Sent: Monday, July 02, 2007 8:34 AM
To: users@jackrabbit.apache.org
Subject: AW: JBoss JTA transaction timeout

hi mihai,

maybe you have the same problem as here described ..


-----Ursprüngliche Nachricht-----
Von: Mihai Anescu [mailto:manescu@totalsoft.ro] 
Gesendet: Freitag, 29. Juni 2007 15:52
An: users@jackrabbit.apache.org
Betreff: JBoss JTA transaction timeout



I have this situation/problem:


We are using JBoss Seam, I have a Stateless EJB configured to do all the
work for the JackRabbit repository, and I have a method that just
retrieves content (files that were previously added by other methods).

So, the flow would be:


1) Load the entity

2) Get a reference to the stateless EJB

3) Call the method to retrieve the content

4) If something is found I put a download button on the interface


The content in the repository is linked to the entity (via an XPath
composed from the entity type + hierarchy + id)


So in the step 3 method, I open a session, and call some methods:

        Session session = getSession();

        Node node = retrieveNode(session, path);

        Node content = null;

        if (node.hasNode(JCR_CONTENT)) {

           content = node.getNode(JCR_CONTENT);


I just read content from the repository, I don't add/modify anything!


But when the method is called I get:

[org.apache.jackrabbit.core.TransactionContext] Transaction rolled back
because timeout expired.

So what's the cause? 

If I use session.logout() then I get another exception, I read somewhere
that the session attaches itself to the current JTA transaction.




View raw message