jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Pfister (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-769) Unable to login with two different Credentials to same workspace in one Transaction
Date Wed, 14 Mar 2007 15:41:09 GMT

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

Dominique Pfister commented on JCR-769:
---------------------------------------

Sorry for introducing TX2B2 which should be TX1B2, of course. IMO, it makes no sense at this
point to somehow change the way XIDs are mapped to TransactionContexts, because they represent
changes made by *one* user. To illustrate my point, let's assume the following situation:

TX1B1: User "joe" makes some change to the repository
TX2B2: User "fred" makes some other change to the repository

Currently, committing transaction TX1 as a whole will lock for some time and eventually fail,
as we know. Changing the way XIDs are mapped, would perform all operations as "joe" or "fred",
whoever comes first, because they are stored as attributes of the TransactionContext. You
can not easily switch to a TransactionContext that remembers changes made by several users.

Honestly, I do appreciate your eagerness to have this problem fixed, but again, it is not
a simple matter of changing the way XIDs are mapped to TransactionContexts (or when to delete
them) that will make the whole thing work.

> 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: patch.txt, 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