A method, system, and program for managing failover of J2EE compliant
middleware in a high availability system are provided. A primary node and
a secondary node each run the same J2EE compliant middleware stack
comprising layers including a load balancer, a web server, a web
application server, a message control server, a monitoring server, and a
database control server. In the primary node, all layers are active. In
the secondary node, part of the layers are active and part of the layers
are in standby. A data replication partition shared between the primary
node and the secondary node includes persistent resource data accessible
to a selection of the layers of the primary node. A heartbeat controller
monitors each node, including the middleware stack, and upon detection of
a failure, controls transfer of the services provided by the primary node
to the secondary node by transferring virtual IP addresses from the
primary node to the secondary node, remounting the data replication
partition for access by the secondary node, and activating the standby
layers which require access to the data in the data replication
partition.