You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "Potgieter, Derick D" <De...@standardbank.co.za> on 2012/11/05 20:42:56 UTC

TransactionManager in Tomee 1.5.0 Rest

Hi,

Can anyone confirm how to get hold of the TransactionManager in tomee? I`m trying to integrate Activiti with Tomee using CDI and need to get hold of the TransactionManager.

>From what I read it should be 
"java:comp/env/comp/TransactionManager"
Or
"java:comp/TransactionManager"

But that doesn't seem to work

Thanks
Derick
Standard Bank email disclaimer and confidentiality note
Please go to http://www.standardbank.co.za/site/homepage/emaildisclaimer.html to read our email disclaimer and confidentiality note. Kindly email disclaimer@standardbank.co.za (no content or subject line necessary) if you cannot view that page and we will email our email disclaimer and confidentiality note to you.

Re: TransactionManager in Tomee 1.5.0 Rest

Posted by Romain Manni-Bucau <rm...@gmail.com>.
@Path("/bar")
public class Foo {
    @GET
    public String test() throws NamingException {
        return new
InitialContext().lookup("java:comp/TransactionManager").toString();
    }
}

works fine in TomEE (at least on trunk)

*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*




2012/11/8 Jean-Louis MONTEIRO <je...@gmail.com>

> Do u have sthg small to share with us so that we can give it a try?
> It should works event if as per the spec java:comp is only accessible from
> a JEE component (ebb, cdi, servlet, etc) but not any class.
>
>
> 2012/11/5 Derick Potgieter <de...@gmail.com>
>
> > Hi All,
> >
> > I have tried multiple combinations but cant seem to get this right at
> all.
> > Is the TransactionManager accessible from within Tomee? or am i just
> using
> > the wrong names?
> >
> > return InitialContext.doLookup("java:comp/TransactionManager");
> >
> > Regards
> > Derick
> >
> > On Mon, Nov 5, 2012 at 9:42 PM, Potgieter, Derick D <
> > Derick.Potgieter@standardbank.co.za> wrote:
> >
> > > Hi,
> > >
> > > Can anyone confirm how to get hold of the TransactionManager in tomee?
> > I`m
> > > trying to integrate Activiti with Tomee using CDI and need to get hold
> of
> > > the TransactionManager.
> > >
> > > From what I read it should be
> > > "java:comp/env/comp/TransactionManager"
> > > Or
> > > "java:comp/TransactionManager"
> > >
> > > But that doesn't seem to work
> > >
> > > Thanks
> > > Derick
> > > Standard Bank email disclaimer and confidentiality note
> > > Please go to
> > > http://www.standardbank.co.za/site/homepage/emaildisclaimer.html to
> read
> > > our email disclaimer and confidentiality note. Kindly email
> > > disclaimer@standardbank.co.za (no content or subject line necessary)
> if
> > > you cannot view that page and we will email our email disclaimer and
> > > confidentiality note to you.
> > >
> >
>

Re: TransactionManager in Tomee 1.5.0 Rest

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Do u have sthg small to share with us so that we can give it a try?
It should works event if as per the spec java:comp is only accessible from
a JEE component (ebb, cdi, servlet, etc) but not any class.


2012/11/5 Derick Potgieter <de...@gmail.com>

> Hi All,
>
> I have tried multiple combinations but cant seem to get this right at all.
> Is the TransactionManager accessible from within Tomee? or am i just using
> the wrong names?
>
> return InitialContext.doLookup("java:comp/TransactionManager");
>
> Regards
> Derick
>
> On Mon, Nov 5, 2012 at 9:42 PM, Potgieter, Derick D <
> Derick.Potgieter@standardbank.co.za> wrote:
>
> > Hi,
> >
> > Can anyone confirm how to get hold of the TransactionManager in tomee?
> I`m
> > trying to integrate Activiti with Tomee using CDI and need to get hold of
> > the TransactionManager.
> >
> > From what I read it should be
> > "java:comp/env/comp/TransactionManager"
> > Or
> > "java:comp/TransactionManager"
> >
> > But that doesn't seem to work
> >
> > Thanks
> > Derick
> > Standard Bank email disclaimer and confidentiality note
> > Please go to
> > http://www.standardbank.co.za/site/homepage/emaildisclaimer.html to read
> > our email disclaimer and confidentiality note. Kindly email
> > disclaimer@standardbank.co.za (no content or subject line necessary) if
> > you cannot view that page and we will email our email disclaimer and
> > confidentiality note to you.
> >
>

Re: TransactionManager in Tomee 1.5.0 Rest

Posted by Derick Potgieter <de...@gmail.com>.
Hi All,

I have tried multiple combinations but cant seem to get this right at all.
Is the TransactionManager accessible from within Tomee? or am i just using
the wrong names?

return InitialContext.doLookup("java:comp/TransactionManager");

Regards
Derick

On Mon, Nov 5, 2012 at 9:42 PM, Potgieter, Derick D <
Derick.Potgieter@standardbank.co.za> wrote:

> Hi,
>
> Can anyone confirm how to get hold of the TransactionManager in tomee? I`m
> trying to integrate Activiti with Tomee using CDI and need to get hold of
> the TransactionManager.
>
> From what I read it should be
> "java:comp/env/comp/TransactionManager"
> Or
> "java:comp/TransactionManager"
>
> But that doesn't seem to work
>
> Thanks
> Derick
> Standard Bank email disclaimer and confidentiality note
> Please go to
> http://www.standardbank.co.za/site/homepage/emaildisclaimer.html to read
> our email disclaimer and confidentiality note. Kindly email
> disclaimer@standardbank.co.za (no content or subject line necessary) if
> you cannot view that page and we will email our email disclaimer and
> confidentiality note to you.
>