aspose file tools*
The moose likes Object Relational Mapping and the fly likes EclipseLink1.1 inserts no data.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "EclipseLink1.1 inserts no data.." Watch "EclipseLink1.1 inserts no data.." New topic
Author

EclipseLink1.1 inserts no data..

Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

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..


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

Without looking at the source code, it's a bit hard to tell. It maybe a stupid question, but did you call commit()?


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

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

Joined: Oct 01, 2007
Posts: 553
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.

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Thanks James Sutherland for your reply..
Okay, it could ran well now, i could save data..

Thanks for your attention..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EclipseLink1.1 inserts no data..