yep, CDI allows you to inject resources in ManagedBeans and then you
are free of the dependency of full Java EE containers.................
and there is much more, but please read a bit before to take
conclusions.. CDI is a new and wonderful exploration area.............
On Wed, Feb 24, 2010 at 2:19 PM, Markus Karg <karg_at_quipsy.de> wrote:
> Felipe,
>
> I see. So THAT is what that CDI acronym is all about... ;-)
>
> Regards
> Markus
>
>> -----Original Message-----
>> From: Felipe Gaścho [mailto:fgaucho_at_gmail.com]
>> Sent: Mittwoch, 24. Februar 2010 14:04
>> To: users_at_glassfish.dev.java.net
>> Subject: Re: Re: Java EE 6: Container Managed Transaction with JAX-RS
>>
>> you can use @ManagedBean to enable dependency injection in the jersey
>> resoures.. and then to use EJBs to have the rest of missed features..
>>
>> you can deploy the EJBs in the same war file as the jersey
>> application....
>>
>> more about the CDI:
>> http://seamframework.org/Documentation/WeldQuickstartForMavenUsers
>>
>> On Wed, Feb 24, 2010 at 11:34 AM, Markus Karg <karg_at_quipsy.de> wrote:
>> > Great. How to configure it? In EJB there is an annotation for that.
>> Can I
>> > use the same annotation in a JAX-RS resource? And does that mean,
>> that I can
>> > use *all* Java EE annotations in JAX-RS, like @PersistenceContext for
>> > example or @Resource?
>> >
>> >
>> >
>> > From: Felipe Gaucho [mailto:fgaucho_at_gmail.com]
>> > Sent: Mittwoch, 24. Februar 2010 11:16
>> > To: users_at_glassfish.dev.java.net
>> > Subject: Re: Java EE 6: Container Managed Transaction with JAX-RS
>> >
>> >
>> >
>> > Yes for both questions...
>> >
>> > On 24.02.2010, at 10:55, "Markus Karg" <karg_at_quipsy.de> wrote:
>> >
>> > I am used to EJB's functionality of Container Managed Transactions:
>> Before
>> > the invocation of an EJB, a TX is started by the container, after the
>> exit
>> > it is committed. I am also used to JAX-RS, using Jersey since GFv2.
>> But I
>> > wonder how it works in Java EE 6, when my EAR contains a combination
>> of
>> > JAX-RS with either JPA or EJB SLSB.
>> >
>> >
>> >
>> > * When using JAX-RS calling JPA (without EJB SLSB), will there be a
>> > container managed transaction?
>> >
>> >
>> >
>> > * When using JAX-RS calling EJB SLSB, will there be a container
>> managed
>> > transaction?
>> >
>> >
>> >
>> > Thanks
>> >
>> > Markus
>> >
>> >
>>
>>
>>
>> --
>> ------------------------------------------
>> Felipe Gaścho
>> 10+ Java Programmer
>> CEJUG Senior Advisor
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
--
------------------------------------------
Felipe Gaścho
10+ Java Programmer
CEJUG Senior Advisor