• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

EclipseLink1.1 inserts no data..

 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic