• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

EclipseLink1.1 inserts no data..

 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • 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..
 
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: 494
Eclipse IDE Postgres Database Java
  • 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..
 
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: 494
Eclipse IDE Postgres Database Java
  • 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..
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic