You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Rafał Kwiecień <ra...@consol.pl> on 2007/02/22 11:36:19 UTC

springmodules and cluster feature

Hi,

I tried cluster feature with springmodules jcr samples. When I added cluster 
to jackrabbit-repo.xml, sample application hanged during committing (no 
exceptions, no logs). I used jackrabbit 1.2.2 and springmodules 0.7. Does 
cluster feature work with springmodules ? Is it problem in jackrabbit or in 
springmodules?

I added:

<Cluster>
  <Journal class="org.apache.jackrabbit.core.cluster.FileJournal">
    <param name="directory" value="./target/journal"/>
    <param name="revision" value="${rep.home}/repository/revision" />
  </Journal>
</Cluster>

local transactions:
[...]
2007-02-22 10:07:53,404 [main] INFO  org.springmodules.examples.jcr.JcrService 
- saved property /node1
2007-02-22 10:07:53,413 [main] DEBUG org.springmodules.jcr.JcrTemplate - Not 
closing pre-bound Jcr Session after JcrTemplate
2007-02-22 10:07:53,414 [main] DEBUG 
org.springframework.transaction.interceptor.TransactionInterceptor - 
Completing transaction for 
[org.springmodules.examples.jcr.JcrService.saveSmth]
2007-02-22 10:07:53,414 [main] DEBUG 
org.springmodules.jcr.jackrabbit.LocalTransactionManager - Triggering 
beforeCommit synchronization
2007-02-22 10:07:53,416 [main] DEBUG 
org.springmodules.jcr.jackrabbit.LocalTransactionManager - Triggering 
beforeCompletion synchronization
2007-02-22 10:07:53,417 [main] DEBUG 
org.springmodules.jcr.jackrabbit.LocalTransactionManager - Initiating 
transaction commit
2007-02-22 10:07:53,417 [main] DEBUG 
org.springmodules.jcr.jackrabbit.LocalTransactionManager - Committing JCR 
transaction on session [org.apache.jackrabbit.core.XASessionImpl@76c5d9c1]

jta transactions:
[...]
2007-02-22 10:43:56,936 [main] INFO  org.springmodules.examples.jcr.JcrService 
- saved property /node1
2007-02-22 10:43:56,944 [main] DEBUG org.springmodules.jcr.JcrTemplate - Not 
closing pre-bound Jcr Session after JcrTemplate
2007-02-22 10:43:56,944 [main] DEBUG 
org.springframework.transaction.interceptor.TransactionInterceptor - 
Completing transaction for 
[org.springmodules.examples.jcr.JcrService.saveSmth]
2007-02-22 10:43:56,945 [main] DEBUG 
org.springframework.transaction.jta.JtaTransactionManager - Triggering 
beforeCommit synchronization
2007-02-22 10:43:56,947 [main] DEBUG 
org.springframework.transaction.jta.JtaTransactionManager - Triggering 
beforeCompletion synchronization
2007-02-22 10:43:56,947 [main] DEBUG 
org.springframework.transaction.support.TransactionSynchronizationManager - 
Removed value [org.springmodules.jcr.SessionHolder@4a4de3fe] for key 
[SessionFactory for Jackrabbit 1.0-dev|workspace=null] from thread [main]
2007-02-22 10:43:56,947 [main] DEBUG org.springmodules.jcr.SessionFactoryUtils 
- Closing JCR Session
2007-02-22 10:43:56,950 [main] DEBUG 
org.springframework.transaction.jta.JtaTransactionManager - Initiating 
transaction commit

-- 
Rafał Kwiecień
ConSol* Consulting & Solutions Software Poland Sp. z o.o.
ul. Piastowska 44C, 30-070 Kraków 
http://www.consol.pl/

Re: springmodules and cluster feature

Posted by Rafał Kwiecień <ra...@consol.pl>.
Hi,

the same problem occurs in the latest svn trunk version. 

Did anybody try to use springmodules with cluster feature enabled ? When will 
it be fixed ? It would be great if it were fixed for version 1.3.

-- 
Rafał Kwiecień
ConSol* Consulting & Solutions Software Poland Sp. z o.o.
ul. Piastowska 44C, 30-070 Kraków 
http://www.consol.pl/

Re: springmodules and cluster feature

Posted by Dominique Pfister <do...@day.com>.
Hi Rafał,

I could easily reproduce the error by letting the XA tests inside
jackrabbit run on a clustered test environment. I filed this as:

  https://issues.apache.org/jira/browse/JCR-785

and the fix should easily make it into the 1.3 release. Thank you for reporting!

Kind regards
Dominique

On 3/12/07, Rafał Kwiecień <ra...@consol.pl> wrote:
> Hi Dominique
>
> Yes. And Yes, the transaction is running on the same thread, so reentrant lock
> could solve the problem.
>
> Dnia piątek, 9 marca 2007 16:08, Dominique Pfister napisał:
> > Hi, Rafał
> >
> > does that mean that there is a transaction trying to update multiple
> > workspaces - "default" and version - and the journal's lock can't be
> > re-acquired? Is that transaction running on the same thread, so a
> > reentrant lock would actually remedy that deficiency?
> >
> > Kind regards
> > Dominique
> >
> > On 2/26/07, Rafał Kwiecień <ra...@consol.pl> wrote:
> > > Hi,
> > >
> > > I know where the problem is. AbstractJournal.begin(String workspace) - in
> > > the second line a lock is acquired - writeMutex.acquire(); During
> > > commiting begin is called twice: begin("default") and begin(null).
> > > Application hangs when begin is called second time and try to acquire
> > > lock one more time.
> > >
> > >
> > > --
> > > Rafał Kwiecień
> > > ConSol* Consulting & Solutions Software Poland Sp. z o.o.
> > > ul. Piastowska 44C, 30-070 Kraków
> > > http://www.consol.pl/
>
> --
> Rafał Kwiecień
> ConSol* Consulting & Solutions Software Poland Sp. z o.o.
> ul. Piastowska 44C, 30-070 Kraków
> http://www.consol.pl/
>

Re: springmodules and cluster feature

Posted by Rafał Kwiecień <ra...@consol.pl>.
Hi Dominique

Yes. And Yes, the transaction is running on the same thread, so reentrant lock 
could solve the problem.

Dnia piątek, 9 marca 2007 16:08, Dominique Pfister napisał:
> Hi, Rafał
>
> does that mean that there is a transaction trying to update multiple
> workspaces - "default" and version - and the journal's lock can't be
> re-acquired? Is that transaction running on the same thread, so a
> reentrant lock would actually remedy that deficiency?
>
> Kind regards
> Dominique
>
> On 2/26/07, Rafał Kwiecień <ra...@consol.pl> wrote:
> > Hi,
> >
> > I know where the problem is. AbstractJournal.begin(String workspace) - in
> > the second line a lock is acquired - writeMutex.acquire(); During
> > commiting begin is called twice: begin("default") and begin(null).
> > Application hangs when begin is called second time and try to acquire
> > lock one more time.
> >
> >
> > --
> > Rafał Kwiecień
> > ConSol* Consulting & Solutions Software Poland Sp. z o.o.
> > ul. Piastowska 44C, 30-070 Kraków
> > http://www.consol.pl/

-- 
Rafał Kwiecień
ConSol* Consulting & Solutions Software Poland Sp. z o.o.
ul. Piastowska 44C, 30-070 Kraków 
http://www.consol.pl/

Re: springmodules and cluster feature

Posted by Dominique Pfister <do...@day.com>.
Hi, Rafał

does that mean that there is a transaction trying to update multiple
workspaces - "default" and version - and the journal's lock can't be
re-acquired? Is that transaction running on the same thread, so a
reentrant lock would actually remedy that deficiency?

Kind regards
Dominique

On 2/26/07, Rafał Kwiecień <ra...@consol.pl> wrote:
> Hi,
>
> I know where the problem is. AbstractJournal.begin(String workspace) - in the
> second line a lock is acquired - writeMutex.acquire(); During commiting begin
> is called twice: begin("default") and begin(null). Application hangs when
> begin is called second time and try to acquire lock one more time.
>
>
> --
> Rafał Kwiecień
> ConSol* Consulting & Solutions Software Poland Sp. z o.o.
> ul. Piastowska 44C, 30-070 Kraków
> http://www.consol.pl/
>

Re: springmodules and cluster feature

Posted by Rafał Kwiecień <ra...@consol.pl>.
Hi,

I know where the problem is. AbstractJournal.begin(String workspace) - in the 
second line a lock is acquired - writeMutex.acquire(); During commiting begin 
is called twice: begin("default") and begin(null). Application hangs when 
begin is called second time and try to acquire lock one more time. 


-- 
Rafał Kwiecień
ConSol* Consulting & Solutions Software Poland Sp. z o.o.
ul. Piastowska 44C, 30-070 Kraków 
http://www.consol.pl/