Migrating rich clients that are deployed in Application Server 7 PE/SE to Application Server 8.1 is rather simple. The deployment descriptors used in Application Server 7 can be used as is in Application Server 8.1. However, if you wish to enable load-balancing and failover features in your client applications, you will need to configure the load-balancing and failover capabilities in the deployment descriptors.
The following procedure describes the steps to migrate the applications:
Identify the components which were installed previously.
Find out the server-instances, using asadmin command or through the directory listing.
The asadmin command requires administration instances to be running. However, administration instances need not be running if the directory listing is used to identify the instances.
In the server.xml file, add the following jvm-options under jvm-config element to enable RMI/IIOP failover feature:
<jvm-config java-home=path...server-classpath=path> <jvm-option> Dorg.omg.PortableInterceptor.ORBInitializerClass. com.sun.appserv.ee.iiop.EEORBInitializer </jvm-option> <jvm-option> Dorg.omg.PortableInterceptor.ORBInitializerClass. com.sun.appserv.ee.iiop.EEIORInterceptorInitializer </jvm-option> <jvm-option> Dcom.sun.CORBA.connection.ORBSocketFactoryClass= com.sun.appserv.enterprise.iiop.EEIIOPSocketFactory </jvm-option> </jvm-config>
Update the availability-service element with availability-enabled flag set to True:
<availability-service availability-enabled="true"> <persistence-store> <property-name="store-pool-jndi-name" value="" /> <property-name="cluster-id" value="cluster1" /> </persistence-store> </availability-service>
Modify the server classpath entry under the java-config element to include:
Add the following jvm-option under java-config element:
Update the sun-acc.xml with the following new load-balancing properties:
<property-name="com.sun.appserv.iiop.loadbalancingpolicy" value="ic-based" /> <property name="com.sun.appserv.iiop.endpoints" value=<host>:<port>" />
To migrate 7 EE applications to 8.1 EE, follow the steps given below:
Add the following jvm-options under java-config element for enabling RMI/IIOP failover feature:
<jvm-config java-home=path...server-classpath=path> <jvm-option> Dorg.omg.PortableInterceptor.ORBInitializerClass.com.sun.appserv.ee.iiop.EEORBInitializer </jvm-option> <jvm-option> Dorg.omg.PortableInterceptor.ORBInitializerClass.com.sun.appserv.ee.iiop.EEIORInterceptorInitializer </jvm-option> <jvm-option> Dcom.sun.CORBA.connection.ORBSocketFactoryClass=com.sun.appserv.enterprise.iiop.EEIIOPSocketFactory </jvm-option> </jvm-config>
Add the following entry in server.xml to setup the iiop-cluster.
<iiop-cluster> <iiop-server-instance name=<server-name>> <iiop-endpoint id=orb-listener-id, host=hostname, port=orb-listener-port/> </iiop-server-instance> </iiop-cluster>
Update sun-acc.xml with the following new entries:
<property-name=Â¨com.sun.appserv.iiop.loadbalancingpolicy" value="ic-based" /> <property name="com.sun.appserv.iiop.endpoints" value="hostname:port" />
The host and port is that of ORB-lister-1 ”s which is defined under iiop-listener element in server.xml.
To migrate the applications from 7 2004Q2 SE, follow the steps described in the section Migrating Rich Clients From 7 PE/SE to 8.1 EE.
Application Server 7 does not support failover of stateful session beans. Application Server 8.1, Platform Edition supports failover of stateful session beans on the HTTP and RMI/IIOP path. This section describes the procedure to migrate EJB applications from Application Server 7 SE/PE/EE to Application Server 8.1 EE to support SFSB state failover.
To achieve high availability of EJB applications that use stateful session beans to persist the data, you need to configure a persistent store for each cluster of application servers, where client session information can be maintained across potential failures of individual appserver instances. In addition, the availability-enabled flag must be turned on for each server instance in the cluster.
Application Server 8.1 EE supports the failover of stateful session beans. In order to enable this feature in your EJB applications that were deployed to Application Server 8.1 EE, follow the steps below:
To migrate Entity beans from previous releases of Sun’s Application Server, follow the procedure described in Entity Beans.
SFSB failover is supported when the SFSB is accessed from EJBs, servlets, or Java Server Pages in applications executing in the same application server process. The SFSB can be accessed through either a local or remote interface.
To take advantage of SFSB state failover support, you need not edit the code. However, you need to provide all the configuration parameters needed for checkpointing the SFSBs in the Sun-specific deployment descriptor (sun-ejb-jar.xml) or in the server configuration file.
For detailed information on SFSB Failover, see Stateful Session Bean Failover in Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide.