You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by alarcher <an...@gmail.com> on 2008/11/25 10:55:47 UTC

User Managed Transactions in JackRabbit

Hello,

I read in the JCR specification that the transactions are an optionnal
feature, if a CR implementation supports this feature then it must supports
two kinds of transactions : Container Managed and User Managed transactions.

While reading some posts about this, I found snipplets about XA
Transactions, which means for me "Container Managed Transactions". I didn't
manage to find information on how to use User Managed transactions within
JackRabbit. Do you know if this feature is available in JackRabbit ?

Thanks a lot,


Antoine Larcher
-- 
View this message in context: http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p20678104.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: User Managed Transactions in JackRabbit

Posted by sl...@excilys.com.
See springmodules JCR support.

Stéphane Landelle

Le Mer 26 novembre 2008 15:09, alarcher a écrit :
>

> Hi again,
>
>
> Does nobody know about which transactions mecanisms are available in
> JackRabbit ?
> I found XA sample code (by casting ((XASession)repository.login())) but I
> consider that I do not need to use XA Transactions in order to do user
> management transaction. So I wondered if there was a "simpler weapon" to
> do commit / rollback (XA is like a bazooka :)  ).
>
> Thanks a lot.
>
>
> Antoine Larcher
>
>
>
> alarcher wrote:
>>
>> Hello,
>>
>>
>> I read in the JCR specification that the transactions are an optionnal
>> feature, if a CR implementation supports this feature then it must
>> supports two kinds of transactions : Container Managed and User Managed
>>  transactions.
>>
>> While reading some posts about this, I found snipplets about XA
>> Transactions, which means for me "Container Managed Transactions". I
>> didn't manage to find information on how to use User Managed
>> transactions within JackRabbit. Do you know if this feature is available
>> in JackRabbit ?
>>
>>
>> Thanks a lot,
>>
>>
>>
>> Antoine Larcher
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p
> 20701512.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>
>



Re: AW: User Managed Transactions in JackRabbit

Posted by alarcher <an...@gmail.com>.
Hi Stephane,


slandelle wrote:
> 
> Once again, if you don't perform composite operations (like a jackrabbit
> update and a db update, a jms message sending or whatever inside the same
> transaction) you don't need XA.
> 

I totally agree


slandelle wrote:
> 
> If you're ready to use Spring tx support, SpringModules provides you with
> a LocalTransactionManager for Jackrabbit.
> 

Yep, I'm going to.
Thanks a lot.

Regards,
Antoine Larcher


slandelle wrote:
> 
> BR,
> 
> Stephane Landelle
> 
> Le Jeu 27 novembre 2008 14:30, alarcher a écrit :
>>
> 
>> Thanks Alex for your answer,
>>
>>
>> I understand your comment, the need of transaction is not very meaningful
>> in my sample code but it was only an example. You can imagine calling
>> Workspace
>> methods which acts directly on persistent layer (whereas my sample shows
>> only calls acting on the transient layer). In this case, we would need a
>> transaction because the Session.save() would have no effect on Workspace
>> methods (for example Workspace.copy).
>>
>> What bothers me is using XA, I would like to use a "simpler" user
>> transaction management (or local transaction management).
>>
>> Thanks again.
>>
>>
>> Regards,
>> Antoine Larcher
>>
>>
>>
>> Alexander Klimetschek wrote:
>>
>>>
>>> If the only thing you do inside your transaction is JCR, why do you
>>> need a global transaction then? Without those XA transactions, a single
>>> session.save() works well as a single transaction.
>>>
>>> Regards,
>>> Alex
>>>
>>>
>>> On Thu, Nov 27, 2008 at 10:51 AM, alarcher <an...@gmail.com>
>>> wrote:
>>>
>>>>
>>>> Thanks guys for your answers,
>>>>
>>>>
>>>> The thing is I do not use an application server, I use jack rabbit in
>>>> a very simple batch. The following code [1] works fine, however I
>>>> wondered if there was an alternative for using XA Transactions. Which
>>>> can do the more can do the less (french expression.. maybe lack of
>>>> translation), but XA seems to be - in this example - a bazooka in
>>>> order to shoot a fly (another french expression :)  ).
>>>>
>>>>
>>>> I'll have a look at Spring JCR support.
>>>>
>>>>
>>>>
>>>> Thanks again.
>>>>
>>>>
>>>> Regards,
>>>> Antoine Larcher
>>>>
>>>>
>>>> [1] :
>>>> Repository repository = RepositoryImpl.create(config);
>>>> XASession session = (XASession)repository.login(new
>>>> SimpleCredentials("username", "password".toCharArray()));
>>>>
>>>>
>>>> try {
>>>> XAResource xares = session.getXAResource();
>>>>
>>>>
>>>> // dummy Xid
>>>> Xid xid = XIDHelper.getDummyXid();
>>>>
>>>>
>>>> // start transaction
>>>> xares.start(xid, XAResource.TMNOFLAGS);
>>>>
>>>> Node root = session.getRootNode();
>>>> Node myNode = root.addNode("test");
>>>> myNode.addMixin("mix:referenceable");
>>>> myNode.setProperty("noderef", myNode); myNode.setProperty("myint",
>>>> 4212);
>>>>
>>>>
>>>> session.save();
>>>>
>>>> Dumper dumper = new DumperImpl();
>>>> dumper.dumpAll(root);
>>>>
>>>> // end transaction
>>>> xares.end(xid, XAResource.TMSUCCESS);
>>>>
>>>> xares.prepare(xid);
>>>>
>>>> xares.commit(xid, false);
>>>>
>>>> dumper = new DumperImpl(); dumper.dumpAll(root);
>>>>
>>>>
>>>>
>>>>
>>>> KÖLL Claus wrote:
>>>>
>>>>>
>>>>> Absolutly ...
>>>>>
>>>>>
>>>>> but i think the most time the current environment will decide which
>>>>> container you are use :-)
>>>>>
>>>>> greets claus
>>>>>
>>>>>> Actually, you don't need an ApplicationServer to go XA. You can
>>>>>> use a lightweight JCA container such as Jencks or Atomikos (I use
>>>>>> Jencks).
>>>>>>
>>>>>
>>>>>> Stephane Landelle
>>>>>>
>>>>>
>>>>>
>>>>> Le Mer 26 novembre 2008 16:17, KÖLL Claus a écrit :
>>>>>
>>>>>> hi Antoine,
>>>>>>
>>>>>> i don't know where you want to run jackrabbit (ApplicationServer)
>>>>>>
>>>>>>
>>>>>> if you want to use xa transaction's managed by the container you
>>>>>> must define Jackrabbit as a JCA ResourceAdapter. after that you
>>>>>> must define a J2C ResourceFactory and grab this resource through
>>>>>> JNDI.
>>>>>>
>>>>>>
>>>>>>
>>>>>> if you are now inside a SessionBean with a Transaction associated
>>>>>>  jackrabbit will use it ...
>>>>>>
>>>>>> there is some rarely documentaion out there but here is a
>>>>>> "sample"
>>>>>> http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
>>>>>>
>>>>>>
>>>>>>
>>>>>> or as Stéphane See springmodules JCR support
>>>>>>
>>>>>>
>>>>>> greets claus
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp206781
>>>> 04p20716244.html
>>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Alexander Klimetschek
>>> alexander.klimetschek@day.com
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p
>> 20719306.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
>>
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p20721653.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: AW: User Managed Transactions in JackRabbit

Posted by sl...@excilys.com.
Once again, if you don't perform composite operations (like a jackrabbit
update and a db update, a jms message sending or whatever inside the same
transaction) you don't need XA.

If you're ready to use Spring tx support, SpringModules provides you with
a LocalTransactionManager for Jackrabbit.

BR,

Stephane Landelle

Le Jeu 27 novembre 2008 14:30, alarcher a écrit :
>

> Thanks Alex for your answer,
>
>
> I understand your comment, the need of transaction is not very meaningful
> in my sample code but it was only an example. You can imagine calling
> Workspace
> methods which acts directly on persistent layer (whereas my sample shows
> only calls acting on the transient layer). In this case, we would need a
> transaction because the Session.save() would have no effect on Workspace
> methods (for example Workspace.copy).
>
> What bothers me is using XA, I would like to use a "simpler" user
> transaction management (or local transaction management).
>
> Thanks again.
>
>
> Regards,
> Antoine Larcher
>
>
>
> Alexander Klimetschek wrote:
>
>>
>> If the only thing you do inside your transaction is JCR, why do you
>> need a global transaction then? Without those XA transactions, a single
>> session.save() works well as a single transaction.
>>
>> Regards,
>> Alex
>>
>>
>> On Thu, Nov 27, 2008 at 10:51 AM, alarcher <an...@gmail.com>
>> wrote:
>>
>>>
>>> Thanks guys for your answers,
>>>
>>>
>>> The thing is I do not use an application server, I use jack rabbit in
>>> a very simple batch. The following code [1] works fine, however I
>>> wondered if there was an alternative for using XA Transactions. Which
>>> can do the more can do the less (french expression.. maybe lack of
>>> translation), but XA seems to be - in this example - a bazooka in
>>> order to shoot a fly (another french expression :)  ).
>>>
>>>
>>> I'll have a look at Spring JCR support.
>>>
>>>
>>>
>>> Thanks again.
>>>
>>>
>>> Regards,
>>> Antoine Larcher
>>>
>>>
>>> [1] :
>>> Repository repository = RepositoryImpl.create(config);
>>> XASession session = (XASession)repository.login(new
>>> SimpleCredentials("username", "password".toCharArray()));
>>>
>>>
>>> try {
>>> XAResource xares = session.getXAResource();
>>>
>>>
>>> // dummy Xid
>>> Xid xid = XIDHelper.getDummyXid();
>>>
>>>
>>> // start transaction
>>> xares.start(xid, XAResource.TMNOFLAGS);
>>>
>>> Node root = session.getRootNode();
>>> Node myNode = root.addNode("test");
>>> myNode.addMixin("mix:referenceable");
>>> myNode.setProperty("noderef", myNode); myNode.setProperty("myint",
>>> 4212);
>>>
>>>
>>> session.save();
>>>
>>> Dumper dumper = new DumperImpl();
>>> dumper.dumpAll(root);
>>>
>>> // end transaction
>>> xares.end(xid, XAResource.TMSUCCESS);
>>>
>>> xares.prepare(xid);
>>>
>>> xares.commit(xid, false);
>>>
>>> dumper = new DumperImpl(); dumper.dumpAll(root);
>>>
>>>
>>>
>>>
>>> KÖLL Claus wrote:
>>>
>>>>
>>>> Absolutly ...
>>>>
>>>>
>>>> but i think the most time the current environment will decide which
>>>> container you are use :-)
>>>>
>>>> greets claus
>>>>
>>>>> Actually, you don't need an ApplicationServer to go XA. You can
>>>>> use a lightweight JCA container such as Jencks or Atomikos (I use
>>>>> Jencks).
>>>>>
>>>>
>>>>> Stephane Landelle
>>>>>
>>>>
>>>>
>>>> Le Mer 26 novembre 2008 16:17, KÖLL Claus a écrit :
>>>>
>>>>> hi Antoine,
>>>>>
>>>>> i don't know where you want to run jackrabbit (ApplicationServer)
>>>>>
>>>>>
>>>>> if you want to use xa transaction's managed by the container you
>>>>> must define Jackrabbit as a JCA ResourceAdapter. after that you
>>>>> must define a J2C ResourceFactory and grab this resource through
>>>>> JNDI.
>>>>>
>>>>>
>>>>>
>>>>> if you are now inside a SessionBean with a Transaction associated
>>>>>  jackrabbit will use it ...
>>>>>
>>>>> there is some rarely documentaion out there but here is a
>>>>> "sample"
>>>>> http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
>>>>>
>>>>>
>>>>>
>>>>> or as Stéphane See springmodules JCR support
>>>>>
>>>>>
>>>>> greets claus
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp206781
>>> 04p20716244.html
>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Alexander Klimetschek
>> alexander.klimetschek@day.com
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p
> 20719306.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>
>



Re: AW: User Managed Transactions in JackRabbit

Posted by alarcher <an...@gmail.com>.
Thanks Alex for your answer,

I understand your comment, the need of transaction is not very meaningful in
my sample code but it was only an example. You can imagine calling Workspace
methods which acts directly on persistent layer (whereas my sample shows
only calls acting on the transient layer). In this case, we would need a
transaction because the Session.save() would have no effect on Workspace
methods (for example Workspace.copy).

What bothers me is using XA, I would like to use a "simpler" user
transaction management (or local transaction management).

Thanks again.

Regards,
Antoine Larcher


Alexander Klimetschek wrote:
> 
> If the only thing you do inside your transaction is JCR, why do you
> need a global transaction then? Without those XA transactions, a
> single session.save() works well as a single transaction.
> 
> Regards,
> Alex
> 
> On Thu, Nov 27, 2008 at 10:51 AM, alarcher <an...@gmail.com>
> wrote:
>>
>> Thanks guys for your answers,
>>
>> The thing is I do not use an application server, I use jack rabbit in a
>> very
>> simple batch.
>> The following code [1] works fine, however I wondered if there was an
>> alternative for using XA Transactions. Which can do the more can do the
>> less
>> (french expression.. maybe lack of translation), but XA seems to be - in
>> this example - a bazooka in order to shoot a fly (another french
>> expression
>> :)  ).
>>
>> I'll have a look at Spring JCR support.
>>
>>
>> Thanks again.
>>
>> Regards,
>> Antoine Larcher
>>
>> [1] :
>>        Repository repository = RepositoryImpl.create(config);
>>        XASession session = (XASession)repository.login(new
>> SimpleCredentials("username", "password".toCharArray()));
>>
>>        try
>>        {
>>            XAResource xares = session.getXAResource();
>>
>>            // dummy Xid
>>            Xid xid = XIDHelper.getDummyXid();
>>
>>            // start transaction
>>            xares.start(xid, XAResource.TMNOFLAGS);
>>
>>            Node root = session.getRootNode();
>>            Node myNode = root.addNode("test");
>>            myNode.addMixin("mix:referenceable");
>>            myNode.setProperty("noderef", myNode);
>>            myNode.setProperty("myint", 4212);
>>
>>            session.save();
>>
>>            Dumper dumper = new DumperImpl();
>>            dumper.dumpAll(root);
>>
>>            // end transaction
>>            xares.end(xid, XAResource.TMSUCCESS);
>>
>>            xares.prepare(xid);
>>
>>            xares.commit(xid, false);
>>
>>            dumper = new DumperImpl();
>>            dumper.dumpAll(root);
>>
>>
>>
>>
>> KÖLL Claus wrote:
>>>
>>> Absolutly ...
>>>
>>> but i think the most time the current environment will
>>> decide which container you are use :-)
>>>
>>> greets
>>> claus
>>>
>>>>Actually, you don't need an ApplicationServer to go XA. You can use a
>>>>lightweight JCA container such as Jencks or Atomikos (I use Jencks).
>>>
>>>>Stephane Landelle
>>>
>>>
>>> Le Mer 26 novembre 2008 16:17, KÖLL Claus a écrit :
>>>> hi Antoine,
>>>>
>>>> i don't know where you want to run jackrabbit (ApplicationServer)
>>>>
>>>> if you want to use xa transaction's managed by the container you must
>>>> define Jackrabbit as a JCA ResourceAdapter. after that you must define
>>>> a
>>>> J2C ResourceFactory and grab this resource through JNDI.
>>>>
>>>>
>>>> if you are now inside a SessionBean with a Transaction associated
>>>> jackrabbit will use it ...
>>>>
>>>> there is some rarely documentaion out there but here is a "sample"
>>>> http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
>>>>
>>>>
>>>> or as Stéphane See springmodules JCR support
>>>>
>>>>
>>>> greets claus
>>>>
>>>
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p20716244.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p20719306.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: AW: User Managed Transactions in JackRabbit

Posted by Alexander Klimetschek <ak...@day.com>.
If the only thing you do inside your transaction is JCR, why do you
need a global transaction then? Without those XA transactions, a
single session.save() works well as a single transaction.

Regards,
Alex

On Thu, Nov 27, 2008 at 10:51 AM, alarcher <an...@gmail.com> wrote:
>
> Thanks guys for your answers,
>
> The thing is I do not use an application server, I use jack rabbit in a very
> simple batch.
> The following code [1] works fine, however I wondered if there was an
> alternative for using XA Transactions. Which can do the more can do the less
> (french expression.. maybe lack of translation), but XA seems to be - in
> this example - a bazooka in order to shoot a fly (another french expression
> :)  ).
>
> I'll have a look at Spring JCR support.
>
>
> Thanks again.
>
> Regards,
> Antoine Larcher
>
> [1] :
>        Repository repository = RepositoryImpl.create(config);
>        XASession session = (XASession)repository.login(new
> SimpleCredentials("username", "password".toCharArray()));
>
>        try
>        {
>            XAResource xares = session.getXAResource();
>
>            // dummy Xid
>            Xid xid = XIDHelper.getDummyXid();
>
>            // start transaction
>            xares.start(xid, XAResource.TMNOFLAGS);
>
>            Node root = session.getRootNode();
>            Node myNode = root.addNode("test");
>            myNode.addMixin("mix:referenceable");
>            myNode.setProperty("noderef", myNode);
>            myNode.setProperty("myint", 4212);
>
>            session.save();
>
>            Dumper dumper = new DumperImpl();
>            dumper.dumpAll(root);
>
>            // end transaction
>            xares.end(xid, XAResource.TMSUCCESS);
>
>            xares.prepare(xid);
>
>            xares.commit(xid, false);
>
>            dumper = new DumperImpl();
>            dumper.dumpAll(root);
>
>
>
>
> KÖLL Claus wrote:
>>
>> Absolutly ...
>>
>> but i think the most time the current environment will
>> decide which container you are use :-)
>>
>> greets
>> claus
>>
>>>Actually, you don't need an ApplicationServer to go XA. You can use a
>>>lightweight JCA container such as Jencks or Atomikos (I use Jencks).
>>
>>>Stephane Landelle
>>
>>
>> Le Mer 26 novembre 2008 16:17, KÖLL Claus a écrit :
>>> hi Antoine,
>>>
>>> i don't know where you want to run jackrabbit (ApplicationServer)
>>>
>>> if you want to use xa transaction's managed by the container you must
>>> define Jackrabbit as a JCA ResourceAdapter. after that you must define a
>>> J2C ResourceFactory and grab this resource through JNDI.
>>>
>>>
>>> if you are now inside a SessionBean with a Transaction associated
>>> jackrabbit will use it ...
>>>
>>> there is some rarely documentaion out there but here is a "sample"
>>> http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
>>>
>>>
>>> or as Stéphane See springmodules JCR support
>>>
>>>
>>> greets claus
>>>
>>
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p20716244.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>



-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: AW: User Managed Transactions in JackRabbit

Posted by alarcher <an...@gmail.com>.
Thanks guys for your answers,

The thing is I do not use an application server, I use jack rabbit in a very
simple batch.
The following code [1] works fine, however I wondered if there was an
alternative for using XA Transactions. Which can do the more can do the less
(french expression.. maybe lack of translation), but XA seems to be - in
this example - a bazooka in order to shoot a fly (another french expression
:)  ).

I'll have a look at Spring JCR support.


Thanks again.

Regards,
Antoine Larcher

[1] :
        Repository repository = RepositoryImpl.create(config);
        XASession session = (XASession)repository.login(new
SimpleCredentials("username", "password".toCharArray()));
        
        try
        {
            XAResource xares = session.getXAResource();

            // dummy Xid
            Xid xid = XIDHelper.getDummyXid();

            // start transaction
            xares.start(xid, XAResource.TMNOFLAGS);

            Node root = session.getRootNode();
            Node myNode = root.addNode("test");
            myNode.addMixin("mix:referenceable");
            myNode.setProperty("noderef", myNode);
            myNode.setProperty("myint", 4212);
            
            session.save();
            
            Dumper dumper = new DumperImpl();
            dumper.dumpAll(root);
            
            // end transaction
            xares.end(xid, XAResource.TMSUCCESS);

            xares.prepare(xid);
            
            xares.commit(xid, false);
            
            dumper = new DumperImpl();
            dumper.dumpAll(root);




KÖLL Claus wrote:
> 
> Absolutly ...
> 
> but i think the most time the current environment will
> decide which container you are use :-)
> 
> greets
> claus
> 
>>Actually, you don't need an ApplicationServer to go XA. You can use a
>>lightweight JCA container such as Jencks or Atomikos (I use Jencks).
> 
>>Stephane Landelle
> 
> 
> Le Mer 26 novembre 2008 16:17, KÖLL Claus a écrit :
>> hi Antoine,
>>
>> i don't know where you want to run jackrabbit (ApplicationServer)
>>
>> if you want to use xa transaction's managed by the container you must
>> define Jackrabbit as a JCA ResourceAdapter. after that you must define a
>> J2C ResourceFactory and grab this resource through JNDI.
>>
>>
>> if you are now inside a SessionBean with a Transaction associated
>> jackrabbit will use it ...
>>
>> there is some rarely documentaion out there but here is a "sample"
>> http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
>>
>>
>> or as Stéphane See springmodules JCR support
>>
>>
>> greets claus
>>
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p20716244.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


AW: User Managed Transactions in JackRabbit

Posted by KÖLL Claus <C....@TIROL.GV.AT>.
Absolutly ...

but i think the most time the current environment will
decide which container you are use :-)

greets
claus

>Actually, you don't need an ApplicationServer to go XA. You can use a
>lightweight JCA container such as Jencks or Atomikos (I use Jencks).

>Stephane Landelle


Le Mer 26 novembre 2008 16:17, KÖLL Claus a écrit :
> hi Antoine,
>
> i don't know where you want to run jackrabbit (ApplicationServer)
>
> if you want to use xa transaction's managed by the container you must
> define Jackrabbit as a JCA ResourceAdapter. after that you must define a
> J2C ResourceFactory and grab this resource through JNDI.
>
>
> if you are now inside a SessionBean with a Transaction associated
> jackrabbit will use it ...
>
> there is some rarely documentaion out there but here is a "sample"
> http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
>
>
> or as Stéphane See springmodules JCR support
>
>
> greets claus
>



Re: AW: User Managed Transactions in JackRabbit

Posted by sl...@excilys.com.
Actually, you don't need an ApplicationServer to go XA. You can use a
lightweight JCA container such as Jencks or Atomikos (I use Jencks).

Stephane Landelle


Le Mer 26 novembre 2008 16:17, KÖLL Claus a écrit :
> hi Antoine,
>
> i don't know where you want to run jackrabbit (ApplicationServer)
>
> if you want to use xa transaction's managed by the container you must
> define Jackrabbit as a JCA ResourceAdapter. after that you must define a
> J2C ResourceFactory and grab this resource through JNDI.
>
>
> if you are now inside a SessionBean with a Transaction associated
> jackrabbit will use it ...
>
> there is some rarely documentaion out there but here is a "sample"
> http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
>
>
> or as Stéphane See springmodules JCR support
>
>
> greets claus
>



AW: User Managed Transactions in JackRabbit

Posted by KÖLL Claus <C....@TIROL.GV.AT>.
hi Antoine,

i don't know where you want to run jackrabbit (ApplicationServer)

if you want to use xa transaction's managed by the container 
you must define Jackrabbit as a JCA ResourceAdapter.
after that you must define a J2C ResourceFactory and grab this resource through JNDI.

if you are now inside a SessionBean with a Transaction associated jackrabbit will use it ...

there is some rarely documentaion out there but here is a "sample"
http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss

or as Stéphane 
See springmodules JCR support

greets
claus

Re: User Managed Transactions in JackRabbit

Posted by alarcher <an...@gmail.com>.
Hi again,

Does nobody know about which transactions mecanisms are available in
JackRabbit ?
I found XA sample code (by casting ((XASession)repository.login())) but I
consider that I do not need to use XA Transactions in order to do user
management transaction.
So I wondered if there was a "simpler weapon" to do commit / rollback (XA is
like a bazooka :)  ).

Thanks a lot.

Antoine Larcher


alarcher wrote:
> 
> Hello,
> 
> I read in the JCR specification that the transactions are an optionnal
> feature, if a CR implementation supports this feature then it must
> supports two kinds of transactions : Container Managed and User Managed
> transactions.
> 
> While reading some posts about this, I found snipplets about XA
> Transactions, which means for me "Container Managed Transactions". I
> didn't manage to find information on how to use User Managed transactions
> within JackRabbit. Do you know if this feature is available in JackRabbit
> ?
> 
> Thanks a lot,
> 
> 
> Antoine Larcher
> 

-- 
View this message in context: http://www.nabble.com/User-Managed-Transactions-in-JackRabbit-tp20678104p20701512.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.