You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/11/08 09:36:43 UTC
How to translate Spring JPA into Aries JPA
Hi,
Do we have an example showing what we define like this in spring
<bean id="transactionTemplate"
class="org.springframework.transaction.support.TransactionTemplate">
<property name="transactionManager">
<bean class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
</property>
</bean>
<bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
<property name="persistenceUnitName" value="camel"/>
</bean>
but using Aries JPA and Aries Transaction now ?
Regards,
Charles M.
Apache ServiceMix, Camel and Karaf committer
Re: How to translate Spring JPA into Aries JPA
Posted by Charles Moulliard <cm...@gmail.com>.
Hi Timothy,
Many thanks for the reply. I will finalize first my ServiceMix4/Camel
tutorial using openJPA + Spring + Tx and next switching to Aries Tx /
Blueprint and Aries JPA. This should be next week. So I will come back
to create a tutorial or a wiki page explaining that.
Regards,
Charles
On 08/11/10 15:17, Timothy Ward wrote:
> Hi,
>
> It looks like you're trying to do Application-Managed JPA rather than container-managed JPA with this example (i.e. you want to have an EntityManagerFactory and manage the EntityManager lifecycle yourself).
>
> In this case you can just inject the persistence unit directly into the bean that wants it with e.g.
>
> <bean id="persistenceBean" class="org.apache.Foo">
> <jpa:unit unitname="camel" property="enitityManagerFactory"/>
> </bean>
>
> This encompasses all of the integration with global transactions as well as the JPA injection via the setEntityManagerFactory method.
>
>
>
> Managed transactions can be configured using the transactions namespace e.g.
>
> <bean id="transacted" class="org.apache.Bar">
> <tx:transaction/>
> </bean>
>
> This bean will have a "Required" transaction attribute for all public methods invoked from outside the bean.
>
>
>
> These two concepts are often used together with container-managed persistence contexts (i.e you let the container manage the EntityManager lifecycle). There are examples of this in the Blog sample.
>
> <bean id="persistenceBean" class="org.apache.Foo">
> <tx:transaction/>
>
> <jpa:context unitname="camel" property="enitityManager"/>
> </bean>
>
>
> I hope this helps. If you'd like to put any of your experiences together it would be great to start building some better documentation for the Aries JPA component.
>
> Regards,
>
> Tim
>
> ----------------------------------------
>> Hi,
>>
>> Do we have an example showing what we define like this in spring
>>
>> <bean id="transactionTemplate"
>> class="org.springframework.transaction.support.TransactionTemplate">
>> <property name="transactionManager">
>> <bean class="org.springframework.orm.jpa.JpaTransactionManager">
>> <property name="entityManagerFactory" ref="entityManagerFactory"/>
>> </bean>
>> </property>
>> </bean>
>>
>> <bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate">
>> <property name="entityManagerFactory" ref="entityManagerFactory"/>
>> </bean>
>>
>> <bean id="entityManagerFactory"
>> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
>> <property name="persistenceUnitName" value="camel"/>
>> </bean>
>>
>> but using Aries JPA and Aries Transaction now ?
>>
>> Regards,
>>
>> Charles M.
>> Apache ServiceMix, Camel and Karaf committer
Re: How to translate Spring JPA into Aries JPA
Posted by Joe Bohn <jo...@gmail.com>.
If Tim is correct and you are looking for an application managed JPA
example you can take a look at the AriesTrader sample which supports
both Container Managed and Application Managed JPA persistence as well
as straight jdbc persistence.
Specifically you can look at the bundle generated under
samples/ariestrader/modules/ariestrader-persist-jpa-am/
for the application managed bits.
Likewise the container managed portion is under
samples/ariestrader/modules/ariestrader-persist-jpa-cm/
and straight jdbc in
samples/ariestrader/modules/ariestrader-persist-jdbc/
Joe
On 11/8/10 9:17 AM, Timothy Ward wrote:
>
> Hi,
>
> It looks like you're trying to do Application-Managed JPA rather than container-managed JPA with this example (i.e. you want to have an EntityManagerFactory and manage the EntityManager lifecycle yourself).
>
> In this case you can just inject the persistence unit directly into the bean that wants it with e.g.
>
> <bean id="persistenceBean" class="org.apache.Foo">
> <jpa:unit unitname="camel" property="enitityManagerFactory"/>
> </bean>
>
> This encompasses all of the integration with global transactions as well as the JPA injection via the setEntityManagerFactory method.
>
>
>
> Managed transactions can be configured using the transactions namespace e.g.
>
> <bean id="transacted" class="org.apache.Bar">
> <tx:transaction/>
> </bean>
>
> This bean will have a "Required" transaction attribute for all public methods invoked from outside the bean.
>
>
>
> These two concepts are often used together with container-managed persistence contexts (i.e you let the container manage the EntityManager lifecycle). There are examples of this in the Blog sample.
>
> <bean id="persistenceBean" class="org.apache.Foo">
> <tx:transaction/>
>
> <jpa:context unitname="camel" property="enitityManager"/>
> </bean>
>
>
> I hope this helps. If you'd like to put any of your experiences together it would be great to start building some better documentation for the Aries JPA component.
>
> Regards,
>
> Tim
>
> ----------------------------------------
>>
>> Hi,
>>
>> Do we have an example showing what we define like this in spring
>>
>> <bean id="transactionTemplate"
>> class="org.springframework.transaction.support.TransactionTemplate">
>> <property name="transactionManager">
>> <bean class="org.springframework.orm.jpa.JpaTransactionManager">
>> <property name="entityManagerFactory" ref="entityManagerFactory"/>
>> </bean>
>> </property>
>> </bean>
>>
>> <bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate">
>> <property name="entityManagerFactory" ref="entityManagerFactory"/>
>> </bean>
>>
>> <bean id="entityManagerFactory"
>> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
>> <property name="persistenceUnitName" value="camel"/>
>> </bean>
>>
>> but using Aries JPA and Aries Transaction now ?
>>
>> Regards,
>>
>> Charles M.
>> Apache ServiceMix, Camel and Karaf committer
--
Joe
Re: How to translate Spring JPA into Aries JPA
Posted by Charles Moulliard <cm...@gmail.com>.
Hi Timothy,
I'm at the DevoXX. So maybe we can discuss a little bit tomorrow. We
have a stand (FuseSource).
How can I configure the container-manager JPA as you tell me that I
configure it like Application-Manager JPA ?
Regards,
Charles
On 08/11/10 15:17, Timothy Ward wrote:
> Hi,
>
> It looks like you're trying to do Application-Managed JPA rather than container-managed JPA with this example (i.e. you want to have an EntityManagerFactory and manage the EntityManager lifecycle yourself).
>
> In this case you can just inject the persistence unit directly into the bean that wants it with e.g.
>
> <bean id="persistenceBean" class="org.apache.Foo">
> <jpa:unit unitname="camel" property="enitityManagerFactory"/>
> </bean>
>
> This encompasses all of the integration with global transactions as well as the JPA injection via the setEntityManagerFactory method.
>
>
>
> Managed transactions can be configured using the transactions namespace e.g.
>
> <bean id="transacted" class="org.apache.Bar">
> <tx:transaction/>
> </bean>
>
> This bean will have a "Required" transaction attribute for all public methods invoked from outside the bean.
>
>
>
> These two concepts are often used together with container-managed persistence contexts (i.e you let the container manage the EntityManager lifecycle). There are examples of this in the Blog sample.
>
> <bean id="persistenceBean" class="org.apache.Foo">
> <tx:transaction/>
>
> <jpa:context unitname="camel" property="enitityManager"/>
> </bean>
>
>
> I hope this helps. If you'd like to put any of your experiences together it would be great to start building some better documentation for the Aries JPA component.
>
> Regards,
>
> Tim
>
> ----------------------------------------
>> Hi,
>>
>> Do we have an example showing what we define like this in spring
>>
>> <bean id="transactionTemplate"
>> class="org.springframework.transaction.support.TransactionTemplate">
>> <property name="transactionManager">
>> <bean class="org.springframework.orm.jpa.JpaTransactionManager">
>> <property name="entityManagerFactory" ref="entityManagerFactory"/>
>> </bean>
>> </property>
>> </bean>
>>
>> <bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate">
>> <property name="entityManagerFactory" ref="entityManagerFactory"/>
>> </bean>
>>
>> <bean id="entityManagerFactory"
>> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
>> <property name="persistenceUnitName" value="camel"/>
>> </bean>
>>
>> but using Aries JPA and Aries Transaction now ?
>>
>> Regards,
>>
>> Charles M.
>> Apache ServiceMix, Camel and Karaf committer
RE: How to translate Spring JPA into Aries JPA
Posted by Timothy Ward <ti...@apache.org>.
Hi,
By adding that line to your blueprint (depending on the level you add it) you will make either:
a) All of the methods on all of the beans in your blueprint
or
b) All of the methods on a single bean in your blueprint
throw an exception if there is no global transaction context when they are called.
Assuming you only ever acess the DAO from within a global transaction this should enforce exactly the behaviour you want. It will also protect your DAO from being used by someone without an over-arching transaction context.
Regards,
Tim
----------------------------------------
> Date: Wed, 17 Nov 2010 18:17:20 +0100
> From: cmoulliard@gmail.com
> To: aries-dev@incubator.apache.org
> Subject: Re: How to translate Spring JPA into Aries JPA
>
> How can I achieve that in the DAO layer ?
> By adding that line -->
>
> On 17/11/10 13:05, Timothy Ward wrote:
> > Hi Charles,
> >
> > It is absolutely possible to do that with Aries JPA/Transactions. If the transaction is started by a component that makes multiple calls to the DAO then that DOA will use the same persistence context for each invocation.
> >
> > A good way to ensure this sort of behaviour is to mark the DAO methods as having a mandatory transaction requirement. That way you ensure that a transaction context is set up by the caller, rather than the DAO. The default required behaviour will also allow transactions to propagate from the caller, but it will obviously create a new one if none exists, rather than throwing an exception.
> >
> > Regards,
> >
> > Tim
> >
> >
> > ----------------------------------------
> >> Date: Mon, 15 Nov 2010 09:41:19 +0100
> >> From: cmoulliard@gmail.com
> >> To: aries-dev@incubator.apache.org
> >> Subject: Re: How to translate Spring JPA into Aries JPA
> >>
> >> Hi Timothy,
> >>
> >> I have checked the content of the Aries Blog example. The example shows
> >> How to inject transaction at the level of the DAO layer (= layer where
> >> we define the mapping between the model and the Database).
> >>
> >> My question is very simple : With Spring, it is possible to define
> >> transactions at the Service layer instead of the DAO. In this case, it
> >> is possible to initiate a transaction from a service to by example
> >> insert address of a person (by calling the AddressDAO interface) AND
> >> next inserting also the person in the DB (by calling the PersonDAO
> >> interface). So, we use the same transaction to calls two different DAO
> >> and entities. Is it possible to do that with Aries Transaction ?
> >>
> >> Regards,
> >>
> >> Charles
> >>
> >> On 08/11/10 15:17, Timothy Ward wrote:
> >>> Hi,
> >>>
> >>> It looks like you're trying to do Application-Managed JPA rather than container-managed JPA with this example (i.e. you want to have an EntityManagerFactory and manage the EntityManager lifecycle yourself).
> >>>
> >>> In this case you can just inject the persistence unit directly into the bean that wants it with e.g.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> This encompasses all of the integration with global transactions as well as the JPA injection via the setEntityManagerFactory method.
> >>>
> >>>
> >>>
> >>> Managed transactions can be configured using the transactions namespace e.g.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> This bean will have a "Required" transaction attribute for all public methods invoked from outside the bean.
> >>>
> >>>
> >>>
> >>> These two concepts are often used together with container-managed persistence contexts (i.e you let the container manage the EntityManager lifecycle). There are examples of this in the Blog sample.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> I hope this helps. If you'd like to put any of your experiences together it would be great to start building some better documentation for the Aries JPA component.
> >>>
> >>> Regards,
> >>>
> >>> Tim
> >>>
> >>> ----------------------------------------
> >>>> Hi,
> >>>>
> >>>> Do we have an example showing what we define like this in spring
> >>>>
> >>>>
> >>>> class="org.springframework.transaction.support.TransactionTemplate">
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
> >>>>
> >>>>
> >>>>
> >>>> but using Aries JPA and Aries Transaction now ?
> >>>>
> >>>> Regards,
> >>>>
> >>>> Charles M.
> >>>> Apache ServiceMix, Camel and Karaf committer
> >
Re: How to translate Spring JPA into Aries JPA
Posted by Charles Moulliard <cm...@gmail.com>.
How can I achieve that in the DAO layer ?
By adding that line --> <tx:transaction method="*" value="Mandatory" />
On 17/11/10 13:05, Timothy Ward wrote:
> Hi Charles,
>
> It is absolutely possible to do that with Aries JPA/Transactions. If the transaction is started by a component that makes multiple calls to the DAO then that DOA will use the same persistence context for each invocation.
>
> A good way to ensure this sort of behaviour is to mark the DAO methods as having a mandatory transaction requirement. That way you ensure that a transaction context is set up by the caller, rather than the DAO. The default required behaviour will also allow transactions to propagate from the caller, but it will obviously create a new one if none exists, rather than throwing an exception.
>
> Regards,
>
> Tim
>
>
> ----------------------------------------
>> Date: Mon, 15 Nov 2010 09:41:19 +0100
>> From: cmoulliard@gmail.com
>> To: aries-dev@incubator.apache.org
>> Subject: Re: How to translate Spring JPA into Aries JPA
>>
>> Hi Timothy,
>>
>> I have checked the content of the Aries Blog example. The example shows
>> How to inject transaction at the level of the DAO layer (= layer where
>> we define the mapping between the model and the Database).
>>
>> My question is very simple : With Spring, it is possible to define
>> transactions at the Service layer instead of the DAO. In this case, it
>> is possible to initiate a transaction from a service to by example
>> insert address of a person (by calling the AddressDAO interface) AND
>> next inserting also the person in the DB (by calling the PersonDAO
>> interface). So, we use the same transaction to calls two different DAO
>> and entities. Is it possible to do that with Aries Transaction ?
>>
>> Regards,
>>
>> Charles
>>
>> On 08/11/10 15:17, Timothy Ward wrote:
>>> Hi,
>>>
>>> It looks like you're trying to do Application-Managed JPA rather than container-managed JPA with this example (i.e. you want to have an EntityManagerFactory and manage the EntityManager lifecycle yourself).
>>>
>>> In this case you can just inject the persistence unit directly into the bean that wants it with e.g.
>>>
>>>
>>>
>>>
>>>
>>> This encompasses all of the integration with global transactions as well as the JPA injection via the setEntityManagerFactory method.
>>>
>>>
>>>
>>> Managed transactions can be configured using the transactions namespace e.g.
>>>
>>>
>>>
>>>
>>>
>>> This bean will have a "Required" transaction attribute for all public methods invoked from outside the bean.
>>>
>>>
>>>
>>> These two concepts are often used together with container-managed persistence contexts (i.e you let the container manage the EntityManager lifecycle). There are examples of this in the Blog sample.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I hope this helps. If you'd like to put any of your experiences together it would be great to start building some better documentation for the Aries JPA component.
>>>
>>> Regards,
>>>
>>> Tim
>>>
>>> ----------------------------------------
>>>> Hi,
>>>>
>>>> Do we have an example showing what we define like this in spring
>>>>
>>>>
>>>> class="org.springframework.transaction.support.TransactionTemplate">
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
>>>>
>>>>
>>>>
>>>> but using Aries JPA and Aries Transaction now ?
>>>>
>>>> Regards,
>>>>
>>>> Charles M.
>>>> Apache ServiceMix, Camel and Karaf committer
>
RE: How to translate Spring JPA into Aries JPA
Posted by Timothy Ward <ti...@apache.org>.
Hi Charles,
It is absolutely possible to do that with Aries JPA/Transactions. If the transaction is started by a component that makes multiple calls to the DAO then that DOA will use the same persistence context for each invocation.
A good way to ensure this sort of behaviour is to mark the DAO methods as having a mandatory transaction requirement. That way you ensure that a transaction context is set up by the caller, rather than the DAO. The default required behaviour will also allow transactions to propagate from the caller, but it will obviously create a new one if none exists, rather than throwing an exception.
Regards,
Tim
----------------------------------------
> Date: Mon, 15 Nov 2010 09:41:19 +0100
> From: cmoulliard@gmail.com
> To: aries-dev@incubator.apache.org
> Subject: Re: How to translate Spring JPA into Aries JPA
>
> Hi Timothy,
>
> I have checked the content of the Aries Blog example. The example shows
> How to inject transaction at the level of the DAO layer (= layer where
> we define the mapping between the model and the Database).
>
> My question is very simple : With Spring, it is possible to define
> transactions at the Service layer instead of the DAO. In this case, it
> is possible to initiate a transaction from a service to by example
> insert address of a person (by calling the AddressDAO interface) AND
> next inserting also the person in the DB (by calling the PersonDAO
> interface). So, we use the same transaction to calls two different DAO
> and entities. Is it possible to do that with Aries Transaction ?
>
> Regards,
>
> Charles
>
> On 08/11/10 15:17, Timothy Ward wrote:
> > Hi,
> >
> > It looks like you're trying to do Application-Managed JPA rather than container-managed JPA with this example (i.e. you want to have an EntityManagerFactory and manage the EntityManager lifecycle yourself).
> >
> > In this case you can just inject the persistence unit directly into the bean that wants it with e.g.
> >
> >
> >
> >
> >
> > This encompasses all of the integration with global transactions as well as the JPA injection via the setEntityManagerFactory method.
> >
> >
> >
> > Managed transactions can be configured using the transactions namespace e.g.
> >
> >
> >
> >
> >
> > This bean will have a "Required" transaction attribute for all public methods invoked from outside the bean.
> >
> >
> >
> > These two concepts are often used together with container-managed persistence contexts (i.e you let the container manage the EntityManager lifecycle). There are examples of this in the Blog sample.
> >
> >
> >
> >
> >
> >
> >
> >
> > I hope this helps. If you'd like to put any of your experiences together it would be great to start building some better documentation for the Aries JPA component.
> >
> > Regards,
> >
> > Tim
> >
> > ----------------------------------------
> >> Hi,
> >>
> >> Do we have an example showing what we define like this in spring
> >>
> >>
> >> class="org.springframework.transaction.support.TransactionTemplate">
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
> >>
> >>
> >>
> >> but using Aries JPA and Aries Transaction now ?
> >>
> >> Regards,
> >>
> >> Charles M.
> >> Apache ServiceMix, Camel and Karaf committer
Re: How to translate Spring JPA into Aries JPA
Posted by Charles Moulliard <cm...@gmail.com>.
Hi Timothy,
I have checked the content of the Aries Blog example. The example shows
How to inject transaction at the level of the DAO layer (= layer where
we define the mapping between the model and the Database).
My question is very simple : With Spring, it is possible to define
transactions at the Service layer instead of the DAO. In this case, it
is possible to initiate a transaction from a service to by example
insert address of a person (by calling the AddressDAO interface) AND
next inserting also the person in the DB (by calling the PersonDAO
interface). So, we use the same transaction to calls two different DAO
and entities. Is it possible to do that with Aries Transaction ?
Regards,
Charles
On 08/11/10 15:17, Timothy Ward wrote:
> Hi,
>
> It looks like you're trying to do Application-Managed JPA rather than container-managed JPA with this example (i.e. you want to have an EntityManagerFactory and manage the EntityManager lifecycle yourself).
>
> In this case you can just inject the persistence unit directly into the bean that wants it with e.g.
>
> <bean id="persistenceBean" class="org.apache.Foo">
> <jpa:unit unitname="camel" property="enitityManagerFactory"/>
> </bean>
>
> This encompasses all of the integration with global transactions as well as the JPA injection via the setEntityManagerFactory method.
>
>
>
> Managed transactions can be configured using the transactions namespace e.g.
>
> <bean id="transacted" class="org.apache.Bar">
> <tx:transaction/>
> </bean>
>
> This bean will have a "Required" transaction attribute for all public methods invoked from outside the bean.
>
>
>
> These two concepts are often used together with container-managed persistence contexts (i.e you let the container manage the EntityManager lifecycle). There are examples of this in the Blog sample.
>
> <bean id="persistenceBean" class="org.apache.Foo">
> <tx:transaction/>
>
> <jpa:context unitname="camel" property="enitityManager"/>
> </bean>
>
>
> I hope this helps. If you'd like to put any of your experiences together it would be great to start building some better documentation for the Aries JPA component.
>
> Regards,
>
> Tim
>
> ----------------------------------------
>> Hi,
>>
>> Do we have an example showing what we define like this in spring
>>
>> <bean id="transactionTemplate"
>> class="org.springframework.transaction.support.TransactionTemplate">
>> <property name="transactionManager">
>> <bean class="org.springframework.orm.jpa.JpaTransactionManager">
>> <property name="entityManagerFactory" ref="entityManagerFactory"/>
>> </bean>
>> </property>
>> </bean>
>>
>> <bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate">
>> <property name="entityManagerFactory" ref="entityManagerFactory"/>
>> </bean>
>>
>> <bean id="entityManagerFactory"
>> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
>> <property name="persistenceUnitName" value="camel"/>
>> </bean>
>>
>> but using Aries JPA and Aries Transaction now ?
>>
>> Regards,
>>
>> Charles M.
>> Apache ServiceMix, Camel and Karaf committer
RE: How to translate Spring JPA into Aries JPA
Posted by Timothy Ward <ti...@hotmail.com>.
Hi,
It looks like you're trying to do Application-Managed JPA rather than container-managed JPA with this example (i.e. you want to have an EntityManagerFactory and manage the EntityManager lifecycle yourself).
In this case you can just inject the persistence unit directly into the bean that wants it with e.g.
<bean id="persistenceBean" class="org.apache.Foo">
<jpa:unit unitname="camel" property="enitityManagerFactory"/>
</bean>
This encompasses all of the integration with global transactions as well as the JPA injection via the setEntityManagerFactory method.
Managed transactions can be configured using the transactions namespace e.g.
<bean id="transacted" class="org.apache.Bar">
<tx:transaction/>
</bean>
This bean will have a "Required" transaction attribute for all public methods invoked from outside the bean.
These two concepts are often used together with container-managed persistence contexts (i.e you let the container manage the EntityManager lifecycle). There are examples of this in the Blog sample.
<bean id="persistenceBean" class="org.apache.Foo">
<tx:transaction/>
<jpa:context unitname="camel" property="enitityManager"/>
</bean>
I hope this helps. If you'd like to put any of your experiences together it would be great to start building some better documentation for the Aries JPA component.
Regards,
Tim
----------------------------------------
>
> Hi,
>
> Do we have an example showing what we define like this in spring
>
> <bean id="transactionTemplate"
> class="org.springframework.transaction.support.TransactionTemplate">
> <property name="transactionManager">
> <bean class="org.springframework.orm.jpa.JpaTransactionManager">
> <property name="entityManagerFactory" ref="entityManagerFactory"/>
> </bean>
> </property>
> </bean>
>
> <bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate">
> <property name="entityManagerFactory" ref="entityManagerFactory"/>
> </bean>
>
> <bean id="entityManagerFactory"
> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
> <property name="persistenceUnitName" value="camel"/>
> </bean>
>
> but using Aries JPA and Aries Transaction now ?
>
> Regards,
>
> Charles M.
> Apache ServiceMix, Camel and Karaf committer