[weld-dev] persistence and transactions outside Java EE

Reza Rahman reza_rahman at lycos.com
Tue Nov 24 19:29:27 EST 2009


Arbi,

In case of Spring, you won't just be configuring a data source, but 
you'll be configuring things that really should be default container 
behavior such as the transaction manager itself, not to mention manually 
hooking up data sources to the transaction manager in case you are not 
using JTA...pretty brittle IMO.

Cheers,
Reza


Arbi Sookazian wrote:
> In most cases perhaps not.  But what about config required for JBoss 
> and XA/2PC datasources?  Isn't that config manually required in 
> foo-xa-ds.xml as well as configuring default tx isolation?
>
> http://www.jboss.org/community/wiki/ConfigDataSources 
> <http://%0Awww.jboss.org/community/wiki/ConfigDataSources>
>
> <transaction-isolation> - the default transaction isolation of the 
> connection (unspecified means use the default provided by the database):
>
>    *
>
>       TRANSACTION_READ_UNCOMMITTED
>
>    *
>
>       TRANSACTION_READ_COMMITTED
>
>    *
>
>       TRANSACTION_REPEATABLE_READ
>
>    *
>
>       TRANSACTION_SERIALIZABLE
>
>    *
>
>       TRANSACTION_NONE
>
>
>
> On Tue, Nov 24, 2009 at 3:53 PM, Reza Rahman <reza_rahman at lycos.com 
> <mailto:reza_rahman at lycos.com>> wrote:
>
>     Steven,
>
>     The difference is that in a Java EE centric environment, there is *no
>     configuration needed period*, inside or outside the WAR to get
>     transactional functionality.
>
>     Cheers,
>     Reza
>
>
>     Boscarine, Steven wrote:
>     > How is the UserTransaction you're mentioning different than the
>     one Spring provides?
>      http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/ch10.html
>     >
>     > There's no configuration needed outside the war.
>     > ________________________________
>     > From: weld-dev-bounces at lists.jboss.org
>     <mailto:weld-dev-bounces at lists.jboss.org>
>     [weld-dev-bounces at lists.jboss.org
>     <mailto:weld-dev-bounces at lists.jboss.org>] On Behalf Of Dan Allen
>     [dan.j.allen at gmail.com <mailto:dan.j.allen at gmail.com>]
>     > Sent: Tuesday, November 24, 2009 3:22 PM
>     > To: Gurkan Erdogdu
>     > Cc: Weld-Dev
>     > Subject: Re: [weld-dev] persistence and transactions outside Java EE
>     >
>     > On Tue, Nov 24, 2009 at 3:17 PM, Gurkan Erdogdu
>     <gurkanerdogdu at yahoo.com
>     <mailto:gurkanerdogdu at yahoo.com><mailto:gurkanerdogdu at yahoo.com
>     <mailto:gurkanerdogdu at yahoo.com>>> wrote:
>     >
>     >>>> the main concern is that JTA transactions simply aren't
>     available in a servlet environment (without extra configuration).
>     >>>>
>     > AFAIK, you can use UserTransaction object
>     >
>     > If I download Tomcat or Jetty right now (unless I didn't get the
>     memo) I won't have a UserTransaction.
>     >
>     > Yes, if I spend half the day searching the web to find a
>     tutorial that actually works, maybe I can "upgrade" these
>     containers to support JTA, but that's a PITA.
>     >
>     > If you can tell me that placing a single JAR file in the
>     container so that EJB lite works, then we have something.
>     >
>     > -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
>     >
>     > _______________________________________________
>     > weld-dev mailing list
>     > weld-dev at lists.jboss.org <mailto:weld-dev at lists.jboss.org>
>     > https://lists.jboss.org/mailman/listinfo/weld-dev
>     >
>     >
>     >
>
>     _______________________________________________
>     weld-dev mailing list
>     weld-dev at lists.jboss.org <mailto:weld-dev at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/weld-dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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