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 04: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 109 times)
  • Attachment: Persistence.xml
    (Size: 1.57KB, Downloaded 106 times)
  • Attachment: UserDao.java
    (Size: 2.42KB, Downloaded 89 times)
  • Attachment: User.java
    (Size: 10.14KB, Downloaded 95 times)
  • Attachment: UserPK.java
    (Size: 1.69KB, Downloaded 83 times)

[Updated on: Tue, 24 July 2012 05: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 17: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] Thu, 02 August 2012 03: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: Wed Oct 22 10:01:06 GMT 2014

Powered by FUDForum. Page generated in 0.01925 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software