Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Spring 3.0.6+Eclipselink2.4.0 persist/insert is not working
Spring 3.0.6+Eclipselink2.4.0 persist/insert is not working [message #897418] Tue, 24 July 2012 00:53 Go to next message
Aditya Indramarta is currently offline Aditya Indramarta
Messages: 2
Registered: July 2012
Junior Member
Hello,


I am using Spring306 + EclipseLink240 to manage entity on a MySql database. Select object from db works fine but when I try to persist one, nothing happens. Program executes correctly and no exception are thrown. I probably did something wrong, as I'm not familiar with Spring, thanks for your comments and suggestions

see my attachment for my code
  • Attachment: Context.xml
    (Size: 4.91KB, Downloaded 104 times)
  • Attachment: Persistence.xml
    (Size: 1.57KB, Downloaded 99 times)
  • Attachment: UserDao.java
    (Size: 2.42KB, Downloaded 81 times)
  • Attachment: User.java
    (Size: 10.14KB, Downloaded 89 times)
  • Attachment: UserPK.java
    (Size: 1.69KB, Downloaded 79 times)

[Updated on: Tue, 24 July 2012 01:35]

Report message to a moderator

Re: Spring 3.0.6+Eclipselink2.4.0 persist/insert is not working [message #899661 is a reply to message #897418] Wed, 01 August 2012 13:35 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Check that your Spring transaction is being committed and is integrated with your persistence unit correctly.

Set logging on finest in EclipseLink to determine what is occurring. My guess is that the EntityManager's transaction is never committed.


James : Wiki : Book : Blog : Twitter
Re: Spring 3.0.6+Eclipselink2.4.0 persist/insert is not working [message #899707 is a reply to message #899661] Wed, 01 August 2012 23:32 Go to previous message
Aditya Indramarta is currently offline Aditya Indramarta
Messages: 2
Registered: July 2012
Junior Member
Thank James,
i found solution for my case it because my spring transaction configuration is the mode="aspectj",
i change to :

<tx:annotation-driven transaction-manager="tmMySql"/>


it work smoothly...
Previous Topic:EntityManager and Multi-threading design question
Next Topic:EclipseLink + Foxpro
Goto Forum:
  


Current Time: Thu Aug 28 09:23:29 EDT 2014

Powered by FUDForum. Page generated in 0.01990 seconds