• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A good choice of ORM framework for my application?

 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application that has a whole load of CORBA objects, implemented in Java, whose state must be stored persistently between runs. Each object has a numeric ID. There are lots of different classes of object. All are Serializable. Many contain Collections. Many cross-reference one another, but do so indirectly via handles. The handles basically wrap IDs.

Currently, this is done by simple persistence code that basically writes the state of each object to one disk file, in binary, using Java serialisation. The file name encodes the object's numeric ID, which is then used for later reconsitution of the object.

I would like to replace the simple file-based persistence code by something that uses a SQL database. The simplest way would be to write BLOBS to a table indexed by the numeric ID. However, this would offer very few of the benefits of a SQL database, as we would have no indexing, no meaningful queries etc.

Better would be to write these objects to tables whose columns represent the fields of the objects. Then we could do indexing, useful queries etc - all the good stuff that SQL databases provide. This sounds like a job for Object Relational Mapping (ORM).

I suspect that Enterprise JavaBeans are not the way to go, because they impose all sorts of things on the structure of the application, which probably could not be accommodated in the existing application. I suspect I want a framework with a simple interface, suited to persisting Plain Old Java Objects (POJOs).

I am wondering what framework might be best and hoping Ranchers may advise helpfully.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, have you looked at EJB 3, which are POJOs

But just find an ORM that implements JPA, like Hibernate 3.2 or some others.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic