|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi
I am starting a Java web server currently using J2SE, Tomcat and mysql DB. Later on I plan to migrate to J2EE probably will use JBoss or Spring. I need to make a choice about the Persistence Framework I am going to use. I am looking for a layer to encapsulate my data objects and hide the DB structure and SQLs but such that will work with J2SE and that would later enable me to migrate to J2EE easily. I am not too familiar with this area and done my share of googling in the last day or two. Currently it seems to me that I am hesitating between 2 options: 1. Hibernate Seems like the most popular choice, the current defacto standard and it supports both J2SE and J2EE. The main problem is that it sounds heavyweight to me and may include 'too many' features I don't need. 2. A JPA (Java Persistence API) implementation (such as glassfish). This relatively new and lightweight API approach is appealing. Especially that it was cut off from EJB 3.0 and can live outside as well as inside a J2EE platform. And there is also a standalone glassfish JPA implementation released. However I am not sure how mature are the specification or the implementation. Will I be able work later on with JBoss or Spring using JPA? As I said - these are from my very brief research. I would love to hear opinions or other options that I did not consider. Thanks, Drorsun. |
|
#2
|
|||
|
|||
|
One easier alternative would be to use a thin business layer sandwiched between the web and the database. You could implement it as JavaBeans with just setters and getters to match the fields in the database and classes to access the database. These classes will have to be synchronized to allow transaction security. This implementation will be extremely lightweight, but care should be taken to avoid database violation. Using JavaBeans is essential as it would allow an easier transition to EJB.
|
|
#3
|
|||
|
|||
|
You might want to look also into iBatis SQL Maps (http://ibatis.apache.org/) it's a very lightweight framework for encapsulating data access that also lets you retain a great deal of control on the queries and access methods used to obtain/store the data.
I personally think it has the best approach to achieve high performance, maintainability and scalability. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > Which persistency framework to choose? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|