You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Thiago Veronezi <th...@veronezi.org> on 2013/09/10 17:32:58 UTC

TransactionManagerLocator for QPID

Hi devs,

I'm playing with Apache TomEE and Apache QPID.
QPID resquires a TransactionManagerLocator class. I've proposed a solution
at their side (https://issues.apache.org/jira/browse/QPID-5125) but I guess
we could have it in our side too. I was thinking about adding a really
simple class in TomEE, so we could use the existing QPID solution
(TransactionManagerLocatorClass
and TransactionManagerLocatorMethod -
http://qpid.apache.org/components/qpid-jca/index.html).

This would be the class...

import org.apache.openejb.OpenEJB;
import javax.transaction.TransactionManager;

public class TransactionManagerLocator {
    public TransactionManager getTm() {
        return OpenEJB.getTransactionManager();
    }
}

Is there an existing project where I could put this class? Should I create
another project "openejb-qpid" like the existing "openejb-activemq"?

[]s,
Thiago.

Re: TransactionManagerLocator for QPID

Posted by Thiago Veronezi <th...@veronezi.org>.
>>you can patch to check the method is static and can be called ;)
I like that!
Thanks!


On Tue, Sep 10, 2013 at 1:08 PM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> oki, you can patch to check the method is static and can be called ;). That
> said we can allow to instantiate OpenEJB ;) and call a method getTm() (ok
> it sounds hacky)
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/9/10 Thiago Veronezi <th...@veronezi.org>
>
> > Hmmmm  actually no.
> > It seems that QPID creates a new instance of the locator class.
> > I will wait a bit and see if my patch is accepted.
> > Thanks,
> > Thiago.
> >
> >
> >
> > On Tue, Sep 10, 2013 at 11:49 AM, Thiago Veronezi <thiago@veronezi.org
> > >wrote:
> >
> > > Tkx!
> > >
> > >
> > > On Tue, Sep 10, 2013 at 11:49 AM, Thiago Veronezi <thiago@veronezi.org
> > >wrote:
> > >
> > >> Ah! Thats true!
> > >> :O) Duh!
> > >>
> > >>
> > >>
> > >> On Tue, Sep 10, 2013 at 11:43 AM, Romain Manni-Bucau <
> > >> rmannibucau@gmail.com> wrote:
> > >>
> > >>> PS: just saw transactionManagerLocatorClass and
> > >>> transactionManagerLocatorMethod
> > >>> configs, isn't it enough and then we can reuse what we already have
> (ie
> > >>> OpenEJB.getTransactionmanager())?
> > >>>
> > >>> *Romain Manni-Bucau*
> > >>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > >>> *Blog: **http://rmannibucau.wordpress.com/*<
> > >>> http://rmannibucau.wordpress.com/>
> > >>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > >>> *Github: https://github.com/rmannibucau*
> > >>>
> > >>>
> > >>>
> > >>> 2013/9/10 Romain Manni-Bucau <rm...@gmail.com>
> > >>>
> > >>> > Hi
> > >>> >
> > >>> > IIRC QPid doesn't need any API import so just putting it in core
> in a
> > >>> > transaction package or something like it sounds enough for me.
> > >>> >
> > >>> > wdyt?
> > >>> >
> > >>> > *Romain Manni-Bucau*
> > >>> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > >>> > *Blog: **http://rmannibucau.wordpress.com/*<
> > >>> http://rmannibucau.wordpress.com/>
> > >>> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > >>> > *Github: https://github.com/rmannibucau*
> > >>> >
> > >>> >
> > >>> >
> > >>> > 2013/9/10 Thiago Veronezi <th...@veronezi.org>
> > >>> >
> > >>> >> Hi devs,
> > >>> >>
> > >>> >> I'm playing with Apache TomEE and Apache QPID.
> > >>> >> QPID resquires a TransactionManagerLocator class. I've proposed a
> > >>> solution
> > >>> >> at their side (https://issues.apache.org/jira/browse/QPID-5125)
> > but I
> > >>> >> guess
> > >>> >> we could have it in our side too. I was thinking about adding a
> > really
> > >>> >> simple class in TomEE, so we could use the existing QPID solution
> > >>> >> (TransactionManagerLocatorClass
> > >>> >> and TransactionManagerLocatorMethod -
> > >>> >> http://qpid.apache.org/components/qpid-jca/index.html).
> > >>> >>
> > >>> >> This would be the class...
> > >>> >>
> > >>> >> import org.apache.openejb.OpenEJB;
> > >>> >> import javax.transaction.TransactionManager;
> > >>> >>
> > >>> >> public class TransactionManagerLocator {
> > >>> >>     public TransactionManager getTm() {
> > >>> >>         return OpenEJB.getTransactionManager();
> > >>> >>     }
> > >>> >> }
> > >>> >>
> > >>> >> Is there an existing project where I could put this class? Should
> I
> > >>> create
> > >>> >> another project "openejb-qpid" like the existing
> "openejb-activemq"?
> > >>> >>
> > >>> >> []s,
> > >>> >> Thiago.
> > >>> >>
> > >>> >
> > >>> >
> > >>>
> > >>
> > >>
> > >
> >
>

Re: TransactionManagerLocator for QPID

Posted by Romain Manni-Bucau <rm...@gmail.com>.
oki, you can patch to check the method is static and can be called ;). That
said we can allow to instantiate OpenEJB ;) and call a method getTm() (ok
it sounds hacky)

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/9/10 Thiago Veronezi <th...@veronezi.org>

> Hmmmm  actually no.
> It seems that QPID creates a new instance of the locator class.
> I will wait a bit and see if my patch is accepted.
> Thanks,
> Thiago.
>
>
>
> On Tue, Sep 10, 2013 at 11:49 AM, Thiago Veronezi <thiago@veronezi.org
> >wrote:
>
> > Tkx!
> >
> >
> > On Tue, Sep 10, 2013 at 11:49 AM, Thiago Veronezi <thiago@veronezi.org
> >wrote:
> >
> >> Ah! Thats true!
> >> :O) Duh!
> >>
> >>
> >>
> >> On Tue, Sep 10, 2013 at 11:43 AM, Romain Manni-Bucau <
> >> rmannibucau@gmail.com> wrote:
> >>
> >>> PS: just saw transactionManagerLocatorClass and
> >>> transactionManagerLocatorMethod
> >>> configs, isn't it enough and then we can reuse what we already have (ie
> >>> OpenEJB.getTransactionmanager())?
> >>>
> >>> *Romain Manni-Bucau*
> >>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> >>> *Blog: **http://rmannibucau.wordpress.com/*<
> >>> http://rmannibucau.wordpress.com/>
> >>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> >>> *Github: https://github.com/rmannibucau*
> >>>
> >>>
> >>>
> >>> 2013/9/10 Romain Manni-Bucau <rm...@gmail.com>
> >>>
> >>> > Hi
> >>> >
> >>> > IIRC QPid doesn't need any API import so just putting it in core in a
> >>> > transaction package or something like it sounds enough for me.
> >>> >
> >>> > wdyt?
> >>> >
> >>> > *Romain Manni-Bucau*
> >>> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> >>> > *Blog: **http://rmannibucau.wordpress.com/*<
> >>> http://rmannibucau.wordpress.com/>
> >>> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> >>> > *Github: https://github.com/rmannibucau*
> >>> >
> >>> >
> >>> >
> >>> > 2013/9/10 Thiago Veronezi <th...@veronezi.org>
> >>> >
> >>> >> Hi devs,
> >>> >>
> >>> >> I'm playing with Apache TomEE and Apache QPID.
> >>> >> QPID resquires a TransactionManagerLocator class. I've proposed a
> >>> solution
> >>> >> at their side (https://issues.apache.org/jira/browse/QPID-5125)
> but I
> >>> >> guess
> >>> >> we could have it in our side too. I was thinking about adding a
> really
> >>> >> simple class in TomEE, so we could use the existing QPID solution
> >>> >> (TransactionManagerLocatorClass
> >>> >> and TransactionManagerLocatorMethod -
> >>> >> http://qpid.apache.org/components/qpid-jca/index.html).
> >>> >>
> >>> >> This would be the class...
> >>> >>
> >>> >> import org.apache.openejb.OpenEJB;
> >>> >> import javax.transaction.TransactionManager;
> >>> >>
> >>> >> public class TransactionManagerLocator {
> >>> >>     public TransactionManager getTm() {
> >>> >>         return OpenEJB.getTransactionManager();
> >>> >>     }
> >>> >> }
> >>> >>
> >>> >> Is there an existing project where I could put this class? Should I
> >>> create
> >>> >> another project "openejb-qpid" like the existing "openejb-activemq"?
> >>> >>
> >>> >> []s,
> >>> >> Thiago.
> >>> >>
> >>> >
> >>> >
> >>>
> >>
> >>
> >
>

Re: TransactionManagerLocator for QPID

Posted by Thiago Veronezi <th...@veronezi.org>.
Hmmmm  actually no.
It seems that QPID creates a new instance of the locator class.
I will wait a bit and see if my patch is accepted.
Thanks,
Thiago.



On Tue, Sep 10, 2013 at 11:49 AM, Thiago Veronezi <th...@veronezi.org>wrote:

> Tkx!
>
>
> On Tue, Sep 10, 2013 at 11:49 AM, Thiago Veronezi <th...@veronezi.org>wrote:
>
>> Ah! Thats true!
>> :O) Duh!
>>
>>
>>
>> On Tue, Sep 10, 2013 at 11:43 AM, Romain Manni-Bucau <
>> rmannibucau@gmail.com> wrote:
>>
>>> PS: just saw transactionManagerLocatorClass and
>>> transactionManagerLocatorMethod
>>> configs, isn't it enough and then we can reuse what we already have (ie
>>> OpenEJB.getTransactionmanager())?
>>>
>>> *Romain Manni-Bucau*
>>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>>> *Blog: **http://rmannibucau.wordpress.com/*<
>>> http://rmannibucau.wordpress.com/>
>>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>> *Github: https://github.com/rmannibucau*
>>>
>>>
>>>
>>> 2013/9/10 Romain Manni-Bucau <rm...@gmail.com>
>>>
>>> > Hi
>>> >
>>> > IIRC QPid doesn't need any API import so just putting it in core in a
>>> > transaction package or something like it sounds enough for me.
>>> >
>>> > wdyt?
>>> >
>>> > *Romain Manni-Bucau*
>>> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>>> > *Blog: **http://rmannibucau.wordpress.com/*<
>>> http://rmannibucau.wordpress.com/>
>>> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>> > *Github: https://github.com/rmannibucau*
>>> >
>>> >
>>> >
>>> > 2013/9/10 Thiago Veronezi <th...@veronezi.org>
>>> >
>>> >> Hi devs,
>>> >>
>>> >> I'm playing with Apache TomEE and Apache QPID.
>>> >> QPID resquires a TransactionManagerLocator class. I've proposed a
>>> solution
>>> >> at their side (https://issues.apache.org/jira/browse/QPID-5125) but I
>>> >> guess
>>> >> we could have it in our side too. I was thinking about adding a really
>>> >> simple class in TomEE, so we could use the existing QPID solution
>>> >> (TransactionManagerLocatorClass
>>> >> and TransactionManagerLocatorMethod -
>>> >> http://qpid.apache.org/components/qpid-jca/index.html).
>>> >>
>>> >> This would be the class...
>>> >>
>>> >> import org.apache.openejb.OpenEJB;
>>> >> import javax.transaction.TransactionManager;
>>> >>
>>> >> public class TransactionManagerLocator {
>>> >>     public TransactionManager getTm() {
>>> >>         return OpenEJB.getTransactionManager();
>>> >>     }
>>> >> }
>>> >>
>>> >> Is there an existing project where I could put this class? Should I
>>> create
>>> >> another project "openejb-qpid" like the existing "openejb-activemq"?
>>> >>
>>> >> []s,
>>> >> Thiago.
>>> >>
>>> >
>>> >
>>>
>>
>>
>

Re: TransactionManagerLocator for QPID

Posted by Thiago Veronezi <th...@veronezi.org>.
Tkx!


On Tue, Sep 10, 2013 at 11:49 AM, Thiago Veronezi <th...@veronezi.org>wrote:

> Ah! Thats true!
> :O) Duh!
>
>
>
> On Tue, Sep 10, 2013 at 11:43 AM, Romain Manni-Bucau <
> rmannibucau@gmail.com> wrote:
>
>> PS: just saw transactionManagerLocatorClass and
>> transactionManagerLocatorMethod
>> configs, isn't it enough and then we can reuse what we already have (ie
>> OpenEJB.getTransactionmanager())?
>>
>> *Romain Manni-Bucau*
>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> *Github: https://github.com/rmannibucau*
>>
>>
>>
>> 2013/9/10 Romain Manni-Bucau <rm...@gmail.com>
>>
>> > Hi
>> >
>> > IIRC QPid doesn't need any API import so just putting it in core in a
>> > transaction package or something like it sounds enough for me.
>> >
>> > wdyt?
>> >
>> > *Romain Manni-Bucau*
>> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> > *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> > *Github: https://github.com/rmannibucau*
>> >
>> >
>> >
>> > 2013/9/10 Thiago Veronezi <th...@veronezi.org>
>> >
>> >> Hi devs,
>> >>
>> >> I'm playing with Apache TomEE and Apache QPID.
>> >> QPID resquires a TransactionManagerLocator class. I've proposed a
>> solution
>> >> at their side (https://issues.apache.org/jira/browse/QPID-5125) but I
>> >> guess
>> >> we could have it in our side too. I was thinking about adding a really
>> >> simple class in TomEE, so we could use the existing QPID solution
>> >> (TransactionManagerLocatorClass
>> >> and TransactionManagerLocatorMethod -
>> >> http://qpid.apache.org/components/qpid-jca/index.html).
>> >>
>> >> This would be the class...
>> >>
>> >> import org.apache.openejb.OpenEJB;
>> >> import javax.transaction.TransactionManager;
>> >>
>> >> public class TransactionManagerLocator {
>> >>     public TransactionManager getTm() {
>> >>         return OpenEJB.getTransactionManager();
>> >>     }
>> >> }
>> >>
>> >> Is there an existing project where I could put this class? Should I
>> create
>> >> another project "openejb-qpid" like the existing "openejb-activemq"?
>> >>
>> >> []s,
>> >> Thiago.
>> >>
>> >
>> >
>>
>
>

Re: TransactionManagerLocator for QPID

Posted by Thiago Veronezi <th...@veronezi.org>.
Ah! Thats true!
:O) Duh!



On Tue, Sep 10, 2013 at 11:43 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> PS: just saw transactionManagerLocatorClass and
> transactionManagerLocatorMethod
> configs, isn't it enough and then we can reuse what we already have (ie
> OpenEJB.getTransactionmanager())?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/9/10 Romain Manni-Bucau <rm...@gmail.com>
>
> > Hi
> >
> > IIRC QPid doesn't need any API import so just putting it in core in a
> > transaction package or something like it sounds enough for me.
> >
> > wdyt?
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/9/10 Thiago Veronezi <th...@veronezi.org>
> >
> >> Hi devs,
> >>
> >> I'm playing with Apache TomEE and Apache QPID.
> >> QPID resquires a TransactionManagerLocator class. I've proposed a
> solution
> >> at their side (https://issues.apache.org/jira/browse/QPID-5125) but I
> >> guess
> >> we could have it in our side too. I was thinking about adding a really
> >> simple class in TomEE, so we could use the existing QPID solution
> >> (TransactionManagerLocatorClass
> >> and TransactionManagerLocatorMethod -
> >> http://qpid.apache.org/components/qpid-jca/index.html).
> >>
> >> This would be the class...
> >>
> >> import org.apache.openejb.OpenEJB;
> >> import javax.transaction.TransactionManager;
> >>
> >> public class TransactionManagerLocator {
> >>     public TransactionManager getTm() {
> >>         return OpenEJB.getTransactionManager();
> >>     }
> >> }
> >>
> >> Is there an existing project where I could put this class? Should I
> create
> >> another project "openejb-qpid" like the existing "openejb-activemq"?
> >>
> >> []s,
> >> Thiago.
> >>
> >
> >
>

Re: TransactionManagerLocator for QPID

Posted by Romain Manni-Bucau <rm...@gmail.com>.
PS: just saw transactionManagerLocatorClass and transactionManagerLocatorMethod
configs, isn't it enough and then we can reuse what we already have (ie
OpenEJB.getTransactionmanager())?

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/9/10 Romain Manni-Bucau <rm...@gmail.com>

> Hi
>
> IIRC QPid doesn't need any API import so just putting it in core in a
> transaction package or something like it sounds enough for me.
>
> wdyt?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/9/10 Thiago Veronezi <th...@veronezi.org>
>
>> Hi devs,
>>
>> I'm playing with Apache TomEE and Apache QPID.
>> QPID resquires a TransactionManagerLocator class. I've proposed a solution
>> at their side (https://issues.apache.org/jira/browse/QPID-5125) but I
>> guess
>> we could have it in our side too. I was thinking about adding a really
>> simple class in TomEE, so we could use the existing QPID solution
>> (TransactionManagerLocatorClass
>> and TransactionManagerLocatorMethod -
>> http://qpid.apache.org/components/qpid-jca/index.html).
>>
>> This would be the class...
>>
>> import org.apache.openejb.OpenEJB;
>> import javax.transaction.TransactionManager;
>>
>> public class TransactionManagerLocator {
>>     public TransactionManager getTm() {
>>         return OpenEJB.getTransactionManager();
>>     }
>> }
>>
>> Is there an existing project where I could put this class? Should I create
>> another project "openejb-qpid" like the existing "openejb-activemq"?
>>
>> []s,
>> Thiago.
>>
>
>

Re: TransactionManagerLocator for QPID

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

IIRC QPid doesn't need any API import so just putting it in core in a
transaction package or something like it sounds enough for me.

wdyt?

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/9/10 Thiago Veronezi <th...@veronezi.org>

> Hi devs,
>
> I'm playing with Apache TomEE and Apache QPID.
> QPID resquires a TransactionManagerLocator class. I've proposed a solution
> at their side (https://issues.apache.org/jira/browse/QPID-5125) but I
> guess
> we could have it in our side too. I was thinking about adding a really
> simple class in TomEE, so we could use the existing QPID solution
> (TransactionManagerLocatorClass
> and TransactionManagerLocatorMethod -
> http://qpid.apache.org/components/qpid-jca/index.html).
>
> This would be the class...
>
> import org.apache.openejb.OpenEJB;
> import javax.transaction.TransactionManager;
>
> public class TransactionManagerLocator {
>     public TransactionManager getTm() {
>         return OpenEJB.getTransactionManager();
>     }
> }
>
> Is there an existing project where I could put this class? Should I create
> another project "openejb-qpid" like the existing "openejb-activemq"?
>
> []s,
> Thiago.
>