Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 31-07-2010
Member
 
Join Date: Jan 2010
Posts: 78
Java Persistence with JDO

We are in a new project at the persistence layer of a Java application from ODMG to JDO. Has anyone here experience with JDO? In particular I am interested in experience with commercial or non-commercial Implementation of JDO and the underlying databases. I am hoping some help from your side as soon as possible.
Reply With Quote
  #2  
Old 31-07-2010
Member
 
Join Date: Dec 2008
Posts: 183
Re: Java Persistence with JDO

I thought ODMG is a now obsolete standard that has been replaced including by JDO. JDO is the simply unmanageable by the overhead of precompilings and a bit annoying. But this is completely subjective! JDO is now also a "come a little out of fashion." News just would JPA and then including the Impl. your choice, depending on the application. As with JDO very well. JPA Support on the server at least you get too close to everywhere "out of the box".
Reply With Quote
  #3  
Old 31-07-2010
Member
 
Join Date: Dec 2008
Posts: 161
Re: Java Persistence with JDO

But if you want such as JDO (any Impl.) JBoss we had to integrate into a hitherto always make the means of JCA, but it is not hard but also effort. Furthermore, the promised performance boost was with us not to feel unfortunately. We had tested this in an App running on a JBoss. Competitors were without a torque against JDO TJODO (if I'm still correct the name on the screen). The ODMG Java Binding the submitted to the Java Community Process as a basis for the Java Data Objects Specification (JDO). A Public Release of the the JDO specification is now available.
Reply With Quote
  #4  
Old 31-07-2010
Member
 
Join Date: Mar 2008
Posts: 258
Re: Java Persistence with JDO

You should know more about the Java Persistence API. In its definition, has combined ideas and concepts of the leading persistence frameworks like Hibernate, Toplink and JDO, and earlier versions of EJB. All these now have an implementation JPA.El object-relational mapping (ie, the relationship between entities and tables in Java database, name, etc) is done via annotations own entity classes. No files are required XML descriptors. Transactions can also be defined as annotations JPA.
Reply With Quote
  #5  
Old 31-07-2010
Member
 
Join Date: Mar 2008
Posts: 227
Re: Java Persistence with JDO

The object / relational mapping, ie the relationship between Java entities and tables of database entries is performed by entity classes themselves, so files are not required XML descriptors. Transactions can also be defined as annotations JPA. The following line of code shows a persistent and managed entity.
Person person = new Person ();
(...) persona.set
entityManager.persist (person)
When metodopersist () is called, the persistence engine will check for the existence of the object with the help of its unique identifier (usually represented in the form of primary key). If a duplicate object is found, it will launch a RuntimeException, EntityExistsException.
Reply With Quote
  #6  
Old 31-07-2010
Member
 
Join Date: Feb 2009
Posts: 105
Re: Java Persistence with JDO

Entity Operations - EntityManager.getReference (class, Object)
This method is similar to find () method takes as arguments the class name and the value of the primary key. But unlike the find () method, which returns null without can not find the body, this method will launch a EntityNotFoundException us. Another difference is that the entity extracted by this method, some details of the entity may have lazy loading (lazyloading) when accessed the first time.
Code:
Long pk = 1; 
Try ( 
Person person = EntityManager.getReference (Persona.class, pk); 
) 
catch (ex EntityNotFoundException) 
( 
... 
)
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Java Persistence with JDO"
Thread Thread Starter Forum Replies Last Post
Persistence Module Stopped Working in Windows Vista Dakshi Windows Vista Performance 3 14-01-2014 09:41 AM
Java Auto Updater wants me to update java everyday in Windows 7 minajoh Windows Software 4 04-09-2013 11:04 PM
Hibernate with Java Persistence API Valliy Software Development 5 18-09-2010 10:06 PM
What are the Bean Persistence? hatred Software Development 5 17-02-2010 05:57 AM
Link List Example in Java Sample program in Java trickson Software Development 2 04-08-2009 08:23 PM


All times are GMT +5.5. The time now is 07:40 AM.