Is it possible to move EJB components from one EJB container to another?

56 views Asked by At

Is possible to move a EJB stateful component with its full internal state among EJB containers after they are deployed?

I.e. I want to creat a system with EJB components that move among different containers. But specification doesn't cover this. So the only way I see now is to create such transportation "manually". But I don't like the ided to invent the wheel.

Do you know some framework that support this. Or is there a simple way to do it for current EJB containers.

3

There are 3 answers

0
Gas On

Same is possible in WebSphere cluster in failover scenarios. Stateful bean state is replicated to other cluster members. If primary server fails, client will be rerouted to the member containing replicated session and bean. If that is what you've been looking for. Some more details here Stateful session bean failover for the EJB container

1
Gabriel Aramburu On

The answear is No.

What exists is the idea of state replication, which basically consist in a software (or service provided by the container) that maintains synchronized copies of an stateful ejb within several connected EJB containers (working in Cluster).

The Ejb specification does not specify any thing about how this state replication service should work, therefore, it can vary from server to server. E.g. this link provides some information about JBoss server.

0
outmind On

In this site:

http://www.wiley.com/legacy/compbooks/vogel/ejb/chapter5.html "Programming with Enterprise JavaBeans, JTS, and OTS"

it is written that ...the EJB object moves between different servers and machines.... So I believe there is a way to implement this.