You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Martin Funk <ma...@gmail.com> on 2014/01/27 17:53:57 UTC

EJB example in YouTube video

Hi,

I am working my way through the "Apache TomEE: JavaEE 6 Web Profile on Tomcat" video on youtube and I have a question. 

The EJB annotation example, right around 20 minutes, does that only works when used in a Servlet?

So what has to be done to use the annotation in an arbitrary class?

For example, what has to be done to use it in a Component of the Wicket framework?

I know the wicket community has already implemented a CDI 1.1, which I already got running.
So this is just a question of understanding.
What is the simplest way of using the EJB Annotation on such Component?
Should the wicket cdi module be used or is there a more direct way of using EJB ?

mf

Re: EJB example in YouTube video

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
A beans.xml file to activate cdi and an empty constructor is enough
Le 27 janv. 2014 18:23, "Martin Funk" <ma...@gmail.com> a écrit :

> Hi,
>
> ok, so what is needed to turn a class to a managed class?
>
> mf
>
> Am 27.01.2014 um 18:03 schrieb Romain Manni-Bucau <rm...@gmail.com>:
>
> > Hi
> >
> > EJB can be injected as CDI beans too so you can use @Inject for them.
> > EJB and CDI beans have the same limitations = you can inject them in
> > all managed classes.
> > Romain Manni-Bucau
> > Twitter: @rmannibucau
> > Blog: http://rmannibucau.wordpress.com/
> > LinkedIn: http://fr.linkedin.com/in/rmannibucau
> > Github: https://github.com/rmannibucau
> >
> >
> >
> > 2014-01-27 Martin Funk <ma...@gmail.com>:
> >> Hi,
> >>
> >> I am working my way through the "Apache TomEE: JavaEE 6 Web Profile on
> Tomcat" video on youtube and I have a question.
> >>
> >> The EJB annotation example, right around 20 minutes, does that only
> works when used in a Servlet?
> >>
> >> So what has to be done to use the annotation in an arbitrary class?
> >>
> >> For example, what has to be done to use it in a Component of the Wicket
> framework?
> >>
> >> I know the wicket community has already implemented a CDI 1.1, which I
> already got running.
> >> So this is just a question of understanding.
> >> What is the simplest way of using the EJB Annotation on such Component?
> >> Should the wicket cdi module be used or is there a more direct way of
> using EJB ?
> >>
> >> mf
>
>

Re: EJB example in YouTube video

Posted by Martin Funk <ma...@gmail.com>.
Hi,

ok, so what is needed to turn a class to a managed class?

mf

Am 27.01.2014 um 18:03 schrieb Romain Manni-Bucau <rm...@gmail.com>:

> Hi
> 
> EJB can be injected as CDI beans too so you can use @Inject for them.
> EJB and CDI beans have the same limitations = you can inject them in
> all managed classes.
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
> 
> 
> 
> 2014-01-27 Martin Funk <ma...@gmail.com>:
>> Hi,
>> 
>> I am working my way through the "Apache TomEE: JavaEE 6 Web Profile on Tomcat" video on youtube and I have a question.
>> 
>> The EJB annotation example, right around 20 minutes, does that only works when used in a Servlet?
>> 
>> So what has to be done to use the annotation in an arbitrary class?
>> 
>> For example, what has to be done to use it in a Component of the Wicket framework?
>> 
>> I know the wicket community has already implemented a CDI 1.1, which I already got running.
>> So this is just a question of understanding.
>> What is the simplest way of using the EJB Annotation on such Component?
>> Should the wicket cdi module be used or is there a more direct way of using EJB ?
>> 
>> mf


Re: EJB example in YouTube video

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

EJB can be injected as CDI beans too so you can use @Inject for them.
EJB and CDI beans have the same limitations = you can inject them in
all managed classes.
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-01-27 Martin Funk <ma...@gmail.com>:
> Hi,
>
> I am working my way through the "Apache TomEE: JavaEE 6 Web Profile on Tomcat" video on youtube and I have a question.
>
> The EJB annotation example, right around 20 minutes, does that only works when used in a Servlet?
>
> So what has to be done to use the annotation in an arbitrary class?
>
> For example, what has to be done to use it in a Component of the Wicket framework?
>
> I know the wicket community has already implemented a CDI 1.1, which I already got running.
> So this is just a question of understanding.
> What is the simplest way of using the EJB Annotation on such Component?
> Should the wicket cdi module be used or is there a more direct way of using EJB ?
>
> mf