• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EclipseLink1.1 inserts no data..

 
Leonardo Carreira
Ranch Hand
Posts: 489
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends..

I'm creating an application using EJB3 + EclipseLink1.1, there's no error with my EJB3 and EclipseLink configuration..
i'm trying to insert data, but there's no data inserted in database..
the tables were generated successfully..

this is my persistence.xml :


please correct me if i'm wrong...

Thanks in advance..
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without looking at the source code, it's a bit hard to tell. It maybe a stupid question, but did you call commit()?
 
Leonardo Carreira
Ranch Hand
Posts: 489
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii Freddy, Thanks for your reply..

this is my EJB code :


usually, when i used this code in TopLink its could ran well, it could save data..
but i don't know exactly why only use this code in EclipseLink, i couldn't save any data..

please correct me if i'm wrong..

Thanks in advance..
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you are using JTA, you need to set your target-server in your persistence.xml to integrate EclipseLink with your server.
Otherwise there is no commit callback from JTA.

i.e.
<property name="eclipselink.target-server" value="WebLogic"/>

See,
http://www.eclipse.org/eclipselink/api/1.2/constant-values.html#org.eclipse.persistence.config.TargetServer

For a list of supported servers. You can also add your own ServerPlatform class for other servers.
 
Leonardo Carreira
Ranch Hand
Posts: 489
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks James Sutherland for your reply..
Okay, it could ran well now, i could save data..

Thanks for your attention..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic