jsr338-experts@jpa-spec.java.net

[jsr338-experts] Re: improve how persistence providers learn of the JTA transaction manager to be used...

From: Werner Keil <werner.keil_at_gmail.com>
Date: Fri, 28 Oct 2011 16:52:15 +0200

+1

I fully agree and (mostly mentioned in EE7 EG discussions) faced problems in
a large project where JPA 2 was introduced together with Spring, JMS and
other Enterprise technologies in a WLS container...

Werner

On Fri, Oct 28, 2011 at 3:33 PM, Scott Marlow <smarlow_at_redhat.com> wrote:

> Recently, I have been spending a lot of time on the JBoss AS JPA container
> and its integration with persistence providers using the JPA SPIs. I think
> we have some low hanging fruit to be had, in standardizing how the
> persistence providers obtain a JTA transaction manager.
>
> I've looked at (mostly four) different persistence providers and how they
> have application server vendor (often version) specific integration for
> obtaining either the JTA TransactionManager or
> TransactionSynchronizationRegi**stry.
>
> To improve how persistence providers integrate with containers, I think we
> should introduce properties for the container to pass a TM/TSR reference to
> the provider. This will help reduce the amount of application server vendor
> specific code, needed by the different persistence providers.
>
> Perhaps the properties could be:
>
> javax.persistence.**transactionmanager - JNDI name of JTA Transaction
> Manager or instance of JTA Transaction Manager
>
> javax.persistence.**transactionsynchronization - JNDI name of
> TransactionSynchronizationRegi**stry or instance of
> TransactionSynchronizationRegi**stry.
>
> The idea being that providers should expect either a TM/TSR to be passed
> directly or to use a JNDI lookup name (so providers could work with EE
> servers that don't have a single TSR/TM to pass in but perhaps have several
> instances to choose from).
>
> What do you think?
>
> Scott
>



-- 
 Werner Keil | JCP Executive Committee Member (SE/EE) | Eclipse UOMo Lead
 Twitter @wernerkeil | #Java_Social | #EclipseUOMo
Skype: werner.keil
* Java2Days: November 3-4 2011, Sofia, Bulgaria. Werner Keil, JCP EC Member,
Agile Coach, UOMo Lead will present "JSR 321: Trusted Java API, Enterprise
Social Networking, Java EE 7 in the Cloud"
* DevoXX: November 16 2011, Antwerp, Belgium. Werner Keil, JCP EC Member, Agile
Coach, UOMo Lead will present "Java EE 7 Gathering"
* Eclipse 10th Birthday: November/December 2011, Germany, Austria. Werner
Keil, UOMo Lead will present "Eclipse UOMo, STEM"