how to use spring to inject EntityBean on EJB 2.1 version using version 2.5 for JDK1.4

359 views Asked by At

I have a legacy project that is running over WebLogic 8.1, J2EE 1.3 using JDK 1.4

We have a lot of EJB's, Session and EntityBeans.

We're intending to create a framework to migrate these applications to Java EE 6, but then we though that's possible to avoid rewriting everything. So, we will build an intermediate code layer using Spring to start to inject the session beans to the client web code. The second phase will migrate the code to compile on JDK 1.5 to run on WebLogic 11g(10.3.2) and the last phase will remove the EntityBeans and replace for POJO using JPA to persistence and control.

At this moment we have not found any documentation about how to inject EntityBeans or these kind of Spring architecture, just the structure for AbstractStatelessSessionBean, AbstractStatefulSessionBean, AbstractMessageDrivenBean as follow to implement Stateless, Stateful or MDB EJB's.

Someone could help me to create any solution for EntityBeans using Spring? Considering that at the first instance we'll still running JDK 1.4, J2EE 1.3. Will I need to still control this manually?

1

There are 1 answers

0
duffymo On

I would guess that EntityBeans would not be injected or under the control of the Spring bean factory. They'd be instantiated by session beans for that particular request.

It's the same idea with a lot of POJOs: You still call new for request-specific beans. Everything isn't the responsibility of Spring.