jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Köll (JIRA) <j...@apache.org>
Subject [jira] Commented: (JCR-769) Unable to login with two different Credentials to same workspace in one Transaction
Date Wed, 07 Mar 2007 12:18:25 GMT

    [ https://issues.apache.org/jira/browse/JCR-769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478757
] 

Claus Köll commented on JCR-769:
--------------------------------

I have put some info logs into the XASessionImpl,TransactionContext and XAWorkspace to find
out where the problem is.
Now i found the problem ..

Below are the the Info logs ..
The 1 log entry explains the log format .. 
=2007-03-07 12:44:00,212 INFO  - [[On Class]XASessionImpl] [(In Method)start] for [Instance
toString()]org.apache.jackrabbit.core.XASessionImpl@53265326 

=2007-03-07 12:44:00,212 INFO  - XASessionImpl associate  for org.apache.jackrabbit.core.XASessionImpl@53265326
given TransactionContext org.apache.jackrabbit.core.TransactionContext@50a950a9 
=2007-03-07 12:44:00,227 INFO  - XASessionImpl start for org.apache.jackrabbit.core.XASessionImpl@111c111c

=2007-03-07 12:44:00,227 INFO  - XASessionImpl associate  for org.apache.jackrabbit.core.XASessionImpl@111c111c
given TransactionContext org.apache.jackrabbit.core.TransactionContext@a460a46 
=2007-03-07 12:44:01,650 INFO  - XASessionImpl end for org.apache.jackrabbit.core.XASessionImpl@111c111c

=2007-03-07 12:44:01,650 INFO  - XASessionImpl associate  for org.apache.jackrabbit.core.XASessionImpl@111c111c
given TransactionContext null 
=2007-03-07 12:44:01,650 INFO  - XASessionImpl end for org.apache.jackrabbit.core.XASessionImpl@53265326

=2007-03-07 12:44:01,650 INFO  - XASessionImpl associate  for org.apache.jackrabbit.core.XASessionImpl@53265326
given TransactionContext null 
=2007-03-07 12:44:01,650 INFO  - XASessionImpl prepare for org.apache.jackrabbit.core.XASessionImpl@111c111c

=2007-03-07 12:44:01,650 INFO  - XASessionImpl TransactionContext.prepare start 
=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - Resource is org.apache.jackrabbit.core.XAWorkspace$1@1f641f64

=2007-03-07 12:44:01,650 INFO  - XAWorkspace prepare in XAResourceBegin lockAcquire start
=2007-03-07 12:44:01,650 INFO  - XAWorkspace prepare in XAResourceBegin lockAcquire end
=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - Resource is org.apache.jackrabbit.core.state.XAItemStateManager@14e614e6

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - Resource is org.apache.jackrabbit.core.lock.XALockManager@1f561f56

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - Resource is org.apache.jackrabbit.core.version.XAVersionManager@1bee1bee

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - Resource is org.apache.jackrabbit.core.XAWorkspace$2@1f681f68

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare afterOperation start on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare afterOperation end on org.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare Method end onorg.apache.jackrabbit.core.TransactionContext@a460a46

=2007-03-07 12:44:01,650 INFO  - XASessionImpl TransactionContext.prepare end 
=2007-03-07 12:44:01,650 INFO  - XASessionImpl return 0 
=2007-03-07 12:44:01,650 INFO  - XASessionImpl prepare for org.apache.jackrabbit.core.XASessionImpl@53265326

=2007-03-07 12:44:01,650 INFO  - XASessionImpl TransactionContext.prepare start 
=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare beforeOperation() start on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare beforeOperation end on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:01,650 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:01,650 INFO  - Resource is org.apache.jackrabbit.core.XAWorkspace$1@618a618a


**** And here is the Problem ..****
=2007-03-07 12:44:01,650 INFO  - XAWorkspace prepare in XAResourceBegin lockAcquire start
Between these 2 Methods 5 seconds elapse !!!! -> the specified Timeout
=2007-03-07 12:44:06,654 INFO  - XAWorkspace prepare in XAResourceBegin lockAcquire end

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - Resource is org.apache.jackrabbit.core.state.XAItemStateManager@56ec56ec

=2007-03-07 12:44:06,654 WARN  - Transaction rolled back because timeout expired. 
=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - Resource is org.apache.jackrabbit.core.lock.XALockManager@617c617c

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - Resource is org.apache.jackrabbit.core.version.XAVersionManager@5e145e14

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare prepareResource start on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - Resource is org.apache.jackrabbit.core.XAWorkspace$2@618e618e

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare prepareResource end on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare afterOperation start on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare afterOperation end on org.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - TransactionContext prepare Method end onorg.apache.jackrabbit.core.TransactionContext@50a950a9

=2007-03-07 12:44:06,654 INFO  - XASessionImpl TransactionContext.prepare end 
=2007-03-07 12:44:06,654 INFO  - XASessionImpl return 0 
=2007-03-07 12:44:06,670 INFO  - XASessionImpl commit for org.apache.jackrabbit.core.XASessionImpl@53265326

=2007-03-07 12:44:07,030 INFO  - XASessionImpl commit for org.apache.jackrabbit.core.XASessionImpl@111c111c

The TransactionContextet keep in prepare state because the WorkspaceInfo acquires the Lock
and will it realese on commit but
a Deadlock occurs.

I hope i have explained it to understand otherwise i will explain it to the "day" guys in
german ;-)
thanks 
claus


> Unable to login with two different Credentials to same workspace in one Transaction
> -----------------------------------------------------------------------------------
>
>                 Key: JCR-769
>                 URL: https://issues.apache.org/jira/browse/JCR-769
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jca
>    Affects Versions: 1.2.1
>         Environment: Websphere 5.1.1 J2C Adapter
>            Reporter: Claus Köll
>         Attachments: stacktrace.txt
>
>
> I'm using the Jackrabbit 1.2.1 JCA adapter and trying to access in a SessionBean-Method
with Container Transaction a Workspace with 2 different Credentials. 
> The Method takes about 400ms to finish but no commit on TransactionContextr occurs (Debugging
..) only the prepare was called 2 times .
> The Container hangs on the PostInvoke Method about 5 seconds and then i get a "javax.transaction.xa.XAException"

> with the Warn Message: Transaction rolled back because timeout expired
> The code ..
> Context ctx = new InitialContext(); 
> Repository repository = (Repository) ctx.lookup("java:comp/env/jackrabbit"); 
> Credentials credentials = new SimpleCredentials("user1", "password1".toCharArray());

> Credentials credentials2 = new SimpleCredentials("user2", "password2".toCharArray());

> Session session1 = repository.login(credentials, "default"); 
> Session session2 = repository.login(credentials2, "default"); 
> Session1 adds a node to the workspace .. and with the session2 i do nothing except the
login !
> If i make no second login the Method works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message