[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Problem with Transactions using EclipseLink
|
Tim,
Yeah. Spring is managing the transaction. Do the eclipselink
unitofwork tied into the spring transactions?
Here is the xml file.
<import resource="applicationContext-dao.xml" />
<import resource="applicationContext-db-eclipselink.xml" />
<tx:advice id="txAdvice" transaction-manager="transactionManagerPvt">
<!-- the transactional semantics... -->
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true" />
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="daoServiceOperation" expression="execution(*
da.db.dao.jpa.*.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="daoServiceOperation" />
</aop:config>
<bean id="transactionManagerPvt"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactoryPrivate" />
<property name="jpaDialect" ref="jpaDialect"></property>
</bean>
<context:spring-configured/>
<tx:annotation-driven transaction-manager="transactionManagerPvt" />
On Sun, Nov 2, 2008 at 10:59 AM, Tim Hollosy <hollosyt@xxxxxxxxx> wrote:
> Hmm what transaction manager are you using? Is spring managing them?
>
> On 11/2/08, Eric Gulatee <eric.gulatee@xxxxxxxxx> wrote:
>> All,
>>
>> Hi I'm trying to build something using spring, jpa, osgi and eclipselink :)
>>
>> I am not seeing my transactions getting committed. I've started
>> poking around in fisheye for eclipselink looking at unitofwork etc.
>>
>> Here are the eclipselink logs. [Which to me indicate there are
>> commits] -- Begin transaction and commit transaction.
>>
>> Any leads/suggestions or ideas what I could be doing wrong to explain
>> the lack of data being inserted into the DB?
>>
>> Cheers,
>> Eric G.
>>
>> [2008-11-02 09:59:20.939] server-tomcat-thread-11
>> System.out I [EL Finer]:
>> Connection(7513337)--begin transaction
>> [2008-11-02 09:59:20.940] server-tomcat-thread-11
>> da.db.dao.jpa.UserDaoJpaImpl.unknown I Persisting using
>> EM=org.eclipse.persistence.internal.jpa.EntityManagerImpl@17b09f
>> [2008-11-02 09:59:20.940] server-tomcat-thread-11
>> System.out I [EL Finest]: PERSIST
>> operation called on: da.db.model.User@b21979.
>> [2008-11-02 09:59:20.940] server-tomcat-thread-11
>> System.out I [EL Finest]: assign
>> sequence to the object (1,542 -> da.db.model.User@b21979)
>> [2008-11-02 09:59:20.940] server-tomcat-thread-11
>> da.db.dao.jpa.UserDaoJpaImpl.unknown I Persisted using
>> EM=org.eclipse.persistence.internal.jpa.EntityManagerImpl@17b09f
>> [2008-11-02 09:59:20.941] server-tomcat-thread-11
>> System.out I [EL Finer]: begin unit
>> of work commit
>> [2008-11-02 09:59:20.941] server-tomcat-thread-11
>> System.out I [EL Finer]:
>> Connection(7513337)--commit transaction
>> [2008-11-02 09:59:20.941] server-tomcat-thread-11
>> System.out I [EL Finer]: end unit of
>> work commit
>> [2008-11-02 09:59:20.942] server-tomcat-thread-11
>> System.out I [EL Finer]: resume unit
>> of work
>> [2008-11-02 09:59:20.942] server-tomcat-thread-11
>> System.out I [EL Finer]: release
>> unit of work
>> [2008-11-02 09:59:20.942] server-tomcat-thread-11
>> System.out I [EL Finer]: client
>> released
>> [2008-11-02 09:59:20.943] server-tomcat-thread-11
>> System.out I [EL Finer]: client
>> acquired
>> [2008-11-02 09:59:20.943] server-tomcat-thread-11
>> System.out I [EL Finer]:
>> Connection(3805535)--begin transaction
>> [2008-11-02 09:59:20.943] server-tomcat-thread-11
>> da.service.impl.AuditManagementImpl.unknown I Adding audit log
>> [2008-11-02 09:59:20.943] server-tomcat-thread-11
>> System.out I [EL Finest]: PERSIST
>> operation called on: da.db.model.AuditLog@401ab2.
>> [2008-11-02 09:59:20.944] server-tomcat-thread-11
>> System.out I [EL Finest]: assign
>> sequence to the object (1,543 -> da.db.model.AuditLog@401ab2)
>> [2008-11-02 09:59:20.944] server-tomcat-thread-11
>> System.out I [EL Finer]: begin unit
>> of work commit
>> [2008-11-02 09:59:20.944] server-tomcat-thread-11
>> System.out I [EL Finer]:
>> Connection(3805535)--commit transaction
>> [2008-11-02 09:59:20.944] server-tomcat-thread-11
>> System.out I [EL Finer]: end unit of
>> work commit
>> [2008-11-02 09:59:20.945] server-tomcat-thread-11
>> System.out I [EL Finer]: resume unit
>> of work
>> [2008-11-02 09:59:20.945] server-tomcat-thread-11
>> System.out I [EL Finer]: release
>> unit of work
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>
>
>
> --
> ./tch
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>