mat_the_green | 1 Sep 2009 12:01

How to ensure XAConnection to stop rollback in managed transactions?


Hello,

The database connection times out after about 12 hours and JackRabbit tries
to reconnect but is using a normal java.sql.Connection and is trying to
rollback the transaction.
After reading through some documentation I think that JackRabbit should be
using a XAConnection and I was wondering how I configure the persistence
manager to ensure this?

Thanks in advance.
M
Jukka Zitting | 1 Sep 2009 13:44
Picon
Gravatar

Re: How to ensure XAConnection to stop rollback in managed transactions?

Hi,

Please use the users <at> jackrabbit.apache.org mailing list for questions
about Jackrabbit configuration.

On Tue, Sep 1, 2009 at 12:01 PM,
mat_the_green<matthew <at> newedgeengineering.com> wrote:
> The database connection times out after about 12 hours and JackRabbit tries
> to reconnect but is using a normal java.sql.Connection and is trying to
> rollback the transaction.
> After reading through some documentation I think that JackRabbit should be
> using a XAConnection and I was wondering how I configure the persistence
> manager to ensure this?

Jackrabbit expects to be in full control of the underlying database
connection, so you should not try to use an external transaction
manager for that.

Jackrabbit supports distributed XA transactions on the Session level,
so you can simply associate your JCR sessions with the transaction
manager.

BR,

Jukka Zitting

nikolaz | 1 Sep 2009 15:11
Favicon

Re: Re: Jackrabbit 2.0: LocalName grammar question.

>>    Good afternoon!
>>
>>    We are interested in the grammar and restrictions of LocalNames. As for "§3.2.2 Local Names" (JSR 283) chars like '{' or '}' are valid chars to use in LocalName. Would "{my}NodeName" be a valid LocalName in your Jackrabbit 2.0? If it does then how would it be parsed as expanded name
>
>Yes.
>
>>(§3.2.5.1 Expanded form)?
>
>The expanded form would be
>  "{}{my}NodeName"
>
>>    Expanded form is defined as: ExpandedName ::= '{' Namespace '}' LocalName.
>>
>>    I mean would it be parsed as:
>>    namespace = ''
>>    localname = '{my}NodeName'
>>    or:
>>    namespace = 'my'
>>    localname = 'NodeName'
>>    ...
>
>As "my" is not a syntactically legal namespace name, the parser would consider it part of a local name.
>
>As far as I recall :-)
>
>BR, Julian

o'k! Let's jackrabit got path like

"/{my:favorite}jackrabbit/mailing/"

"my:favorite" is a valid uri and also
"{my:favorite}jackrabbit" is a valid localName ("§3.2.2 Local Names"(JSR 283) chars like '{' or '}' are valid chars to use in LocalName).

So this path segment may be parsed as:

1. qualifiedName, where prefix="" (empty prefix notation that should be written without ":") and localName="{my:favourite}jackrabbit"
2. expandedName, where uri="my:favourite" and localname="jackrabbit"

How would it be parsed? Can I really use "{my:favorite}jackrabbit" as node name with empty prefix?

Jukka Zitting | 1 Sep 2009 15:27
Picon
Gravatar

Re: Re: Jackrabbit 2.0: LocalName grammar question.

Hi,

2009/9/1  <nikolaz <at> ukr.net>:
> o'k! Let's jackrabit got path like
>
> "/{my:favorite}jackrabbit/mailing/"
>
> "my:favorite" is a valid uri and also
> "{my:favorite}jackrabbit" is a valid localName ("ยง3.2.2 Local Names"(JSR
> 283) chars like '{' or '}' are valid chars to use in LocalName).

"{my:favorite}jackrabbit" is not a valid local name as it contains the
':' character.

BR,

Jukka Zitting

Antony Xerich | 1 Sep 2009 16:18
Picon

Re: Re: Jackrabbit 2.0: LocalName grammar question.

I think the only problem place is "{}nodeLocalName". It may be qualified name with empty ns prefix ("" , "{}nodeLocalName" ) or expanded name with empty ns uri ( "", "nodeLocalName" ). It is interesting how would it be translated?

Julian Reschke | 1 Sep 2009 16:47
Picon
Picon

Re: Jackrabbit 2.0: LocalName grammar question.

Antony Xerich wrote:
> I think the only problem place is "{}nodeLocalName". It may be qualified 
> name with empty ns prefix ("" , "{}nodeLocalName" ) or expanded name 
> with empty ns uri ( "", "nodeLocalName" ). It is interesting how would 
> it be translated?

I think the *intent* was to treat "{}foo" as a local name of "{}foo", 
and to consider the expanded notation of "foo" to be "foo".

I'm not sure whether this is clear from the spec; somebody should check :-)

BR, Julian

Marcel Reutegger (JIRA | 1 Sep 2009 17:26
Picon
Favicon

Updated: (JCR-2287) Mandatory jcr:activities node missing after upgrade


     [
https://issues.apache.org/jira/browse/JCR-2287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger updated JCR-2287:
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
           Status: Resolved  (was: Patch Available)

Applied patch in revision: 810096

> Mandatory jcr:activities node missing after upgrade
> ---------------------------------------------------
>
>                 Key: JCR-2287
>                 URL: https://issues.apache.org/jira/browse/JCR-2287
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Marcel Reutegger
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: JCR-2287.patch
>
>
> The mandatory node is only created when the repository is initially empty. The node is missing when an
existing repository instance is upgraded. 

Antony Xerich | 1 Sep 2009 17:39
Picon

Re: Re: Jackrabbit 2.0: LocalName grammar question.

Spec says:

ExpandedName ::= '{' Namespace '}' LocalName
where
Namespace ::= EmptyString | Uri

So "{}foo" is an expanded form with empty ns uri but also is a local name, cause "{" and "}" are valid chars NT-chars (http://www.w3.org/TR/xml/#NT-Char)

And there is still a question how would Jackrabbit 2.0 recognize path like /{}foo/  ? ;)

arcassis@gmail.com | 1 Sep 2009 18:51
Picon

What about deleting versions ?

Hello all,

First of all I want to say that you, folks, are doing a great job with Jackrabbit !
I have a short question: when I delete a versionable node, does JR automatically delete all node's versions ?
If not, how can I delete the remaining orphan versions.

Thanks and regards,

Dan Damian

Jukka Zitting | 1 Sep 2009 22:13
Picon
Gravatar

Re: What about deleting versions ?

Hi,

As a general note, please use the users <at> jackrabbit.apache.org mailing
list for questions about using Jackrabbit.

On Tue, Sep 1, 2009 at 6:51 PM, arcassis <at> gmail.com<arcassis <at> gmail.com> wrote:
> First of all I want to say that you, folks, are doing a great job with
> Jackrabbit !

Thanks!

> I have a short question: when I delete a versionable node, does JR
> automatically delete all node's versions ?

No.

> If not, how can I delete the remaining orphan versions.

Use the VersionHistory.removeVersion() method.

Once you've removed all past versions and there are no remaining
references to the version history, Jackrabbit (since version 1.6.0,
see https://issues.apache.org/jira/browse/JCR-134) will automatically
remove also the version history node from /jcr:system.

BR,

Jukka Zitting


Gmane