Title says it all --- what resources are out there / techniques in use for coding with an eye for future O/R framework change?
Specifically, if you wanted to get out of EJB 2.X CMP / CMR to something else in the future, how can you help yourself out now?
-
How to code for future O/R framework change? (2 messages)
- Posted by: James Robinson
- Posted on: July 07 2004 14:12 EDT
Threaded Messages (2)
- How to code for future O/R framework change? by Senthil Chinnaiyan on July 07 2004 16:51 EDT
- How to code for future O/R framework change? by Tomas Inger on July 08 2004 07:30 EDT
-
How to code for future O/R framework change?[ Go to top ]
- Posted by: Senthil Chinnaiyan
- Posted on: July 07 2004 16:51 EDT
- in response to James Robinson
Title says it all --- what resources are out there / techniques in use for coding with an eye for future O/R framework change?Specifically, if you wanted to get out of EJB 2.X CMP / CMR to something else in the future, how can you help yourself out now?
I did a similar kind of work in my project. Basically I defined a set of interfaces which have all the persistance methods, like load, store, find etc defined in it. I created a Persistance Manager which can be configured to use any persistance implementation dynamically(Using Class.newInstance()). Whatever persistance implemenation you use, have to implement the interface defined by you. You can switch to any implementation like toplink, DAO ... as long as it implements your methods
Hope this helps,
Senthil. -
How to code for future O/R framework change?[ Go to top ]
- Posted by: Tomas Inger
- Posted on: July 08 2004 07:30 EDT
- in response to James Robinson
Title says it all --- what resources are out there / techniques in use for coding with an eye for future O/R framework change?Specifically, if you wanted to get out of EJB 2.X CMP / CMR to something else in the future, how can you help yourself out now?
Hi!
If you have time to, I recommend you to read about entity beans with bean manged persistence in the EJB specification. Although you don't build EJBs, you can learn a lot from the text.
/Tomas