[weld-dev] rationale for JTA/JPA questions - trying to add JPA support to archetypes

Pete Muir pmuir at redhat.com
Mon Nov 30 07:23:20 EST 2009


Right, this is trivial to do for all CDI managed objects (with Weld Servlet container) (especially if Weld is the one to start Hibernate/JPA!)

On 28 Nov 2009, at 16:51, Gavin King wrote:

> That's more or less an easy problem to solve. But why do you want to
> inject it using @PersistenceContext instead of @Inject??
> 
> On Sat, Nov 28, 2009 at 11:47 AM, Dan Allen <dan.j.allen at gmail.com> wrote:
>> There's also the issue of injecting an EntityManager (@PersistenceContext)
>> in Tomcat/Jetty, which, to my knowledge, there is no solution (apart from
>> EJB lite). Yes, the servlet containers are deficient, so what we are
>> essentially doing is migrating users to the Web Profile from Tomcat/Jetty.
>> 
>> -Dan
>> 
>> On Sat, Nov 28, 2009 at 11:42 AM, Dan Allen <dan.j.allen at gmail.com> wrote:
>>> 
>>>> 
>>>> As to what Dan is referring to, it is likely JOTM:
>>>> http://jotm.objectweb.org, which you won't have to deal with whether you
>>>> are using an embedded EJB Lite container or a CDI specific transaction
>>>> manager with JPA on Tomcat.
>>> 
>>> Correct. I've also tried Atomikos Essentials, which I actually did get to
>>> work, but should everyone have to fill out a form to use transactions?
>>> http://www.atomikos.com/Main/TransactionsEssentialsDownloadForm That
>>> strengthens Gavin's point about how screwed up this situation with
>>> transactions has become.
>>> 
>>> What we we need a simple, reliable, documented way for developers to
>>> educate Tomcat how to do transactions correctly. I'm praying that EJB lite
>>> is that solution. I've heard some promising statements and we want to
>>> confirm them through our archetypes. The whole idea of creating these
>>> archetypes, as Steven said, is to get the developer using CDI, JSF 2, JPA
>>> and JTA without even a moment of time wasted, with their choice of Tomcat,
>>> Jetty or a Java EE container. When we have that, we will have accomplished
>>> our first, and most critical, goal.
>>> 
>>> -Dan
>>> 
>>> --
>>> Dan Allen
>>> Senior Software Engineer, Red Hat | Author of Seam in Action
>>> Registered Linux User #231597
>>> 
>>> http://mojavelinux.com
>>> http://mojavelinux.com/seaminaction
>>> http://www.google.com/profiles/dan.j.allen
>> 
>> 
>> 
>> --
>> Dan Allen
>> Senior Software Engineer, Red Hat | Author of Seam in Action
>> Registered Linux User #231597
>> 
>> http://mojavelinux.com
>> http://mojavelinux.com/seaminaction
>> http://www.google.com/profiles/dan.j.allen
>> 
>> _______________________________________________
>> weld-dev mailing list
>> weld-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/weld-dev
>> 
> 
> 
> 
> -- 
> Gavin King
> gavin.king at gmail.com
> http://in.relation.to/Bloggers/Gavin
> http://hibernate.org
> http://seamframework.org
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev




More information about the weld-dev mailing list