views:

59

answers:

2

We have a custom Persistence Framework wrapping the Entity Beans. I want to know why is this required or does it have any performance improvement when we already have Entity Beans (CMP) why the persistence framework is required.

+1  A: 

It is not required.

We can't answer for the performance improvements, not knowing it.

You must understand that CMP is a very dated technology (EJB 2). Try to keep away from it as much as possible, modern technologies such as JPA implementations have much better performance and ease of use.


UPDATED after OP comment:

The custom framework was developed back in 2001 and is working as a wrapper. We cannot move to JPA at this moment, the product is still working on java 1.4.2. I want to know why a persistence framework is required. Any help will be appreciated.

Such a custom framework is not required in general.

However, you already have it, and have probably hundreds of uses of it. Changing such a framework is a big effort, with high risks for regressions, so you can't do it just for fun.

If you think that your application is heading toward a regular JPA framework in the medium-range future, I would hold my breath until then. At that time, you can get rid of the old framework, and start fresh. And add framework features ;-), but only as needed!

KLE
The custom framework was developed back in 2001 and is working as a wrapper. We cannot move to JPA at this moment, the product is still working on java 1.4.2. I want to know why a persistence framework is required. Any help will be appreciated.
Ashish
+2  A: 

We have a custom Persistence Framework wrapping the Entity Beans. I want to know why is this required or does it have any performance improvement when we already have Entity Beans (CMP) why the persistence framework is required.

You could of course use Entity Beans directly but my guess is that the custom framework is there to hide, if this is even possible, some bits of the complexity of the Entity Beans, hence the name "wrapper". But it is very unlikely that the wrapper does improve the performance as wrapping a Trabant with the body of a Testarossa won't magically make the Trabant perform like a Ferrari.

PS: Hibernate can be used with Java 1.4.

Pascal Thivent
Awesome comparision :)
BalusC
@BalusC it sounded appropriate to me here :)
Pascal Thivent