![]() |
Sun ONE Application Server 7, Standard Edition Sun[tm] ONE Studio 4, Enterprise Edition for Java[tm] with Application Server 7 Tutorial |
Using IDE Plug-in With Sun Java System Application Server 7 2004Q2
The IDE Plug-in for Sun ONE Application Server 7 enables you to work with Sun Java System Application Server 7 2004Q2. However, configuration of high availability features is not supported.
You can develop, configure, deploy, and administer an Application/Module using Studio Plugin.
Known issue: When you deploy a J2EE application to the application server, the server.xml file is not updated with the virtual server entry.
Perform the following steps after deployment:
- Open the server.xml file located in the application server installation directory: instance_dir/config. Where, instance_dir is the application server instance on which the application is being deployed.
- Under the deployed applications tag, add the attribute virtual-server and set the value. For example:
Replace the following code line
<j2ee-application enabled = "true" location="/sun/appserver7ee/domains/domain1/server1/applications/j2ee-apps/stateful-simple_1" name="stateful-simple">
with:
<j2ee-application enabled = "true" location="/sun/appserver7ee/domains/domain1/server1/applications/j2ee-apps/stateful-simple_1" name="stateful-simple" virtual-servers="server1">- Save the changes in the server.xml file.
- In the Administration Console, open the Application Server Instance node. Select "server1". In the General tabbed pane, click the button Apply Changes.
You can also use the asadmin reconfig command with keepmanualchanges attribute set to true to apply changes. For more information on using the asadmin command, see the Sun Java System Application Server 7 2004Q2 Administration Guide.Using High Availability Features of Sun Java System Application Server 7 2004Q2
To use the Sun Java System Application Server 7 2004Q2 high availability features for applications that contain stateful session beans or a web module; you need to perform the steps described in the sections below after deployment and reload the application:
Enabling "availability-enabled" attribute for deployed application
- Open the server.xml file located in the application server installation directory: instance_dir/config. Where, instance_dir is the application server instance on which the application is being deployed.
- Under the deployed applications tag, add the attribute availability-enabled and set the value. For example:
Replace the following code line
<j2ee-application enabled = "true" location="/sun/appserver7ee/domains/domain1/server1/applications/j2ee-apps/stateful-simple_1" name="stateful-simple">
with:
<j2ee-application enabled = "true" location="/sun/appserver7ee/domains/domain1/server1/applications/j2ee-apps/stateful-simple_1" name="stateful-simple" availability-enabled="true">- Add the virtual server entry(Please refer to the section above)
- Save the changes in the server.xml file.
- In the Administration Console, open the Application Server Instance node. Select "server1". In the General tabbed pane, click the button Apply Changes.You can also use the asadmin reconfig command with keepmanualchanges attribute set to true to apply changes. For more information on using the asadmin command, see the Sun Java System Application Server 7 2004Q2 Administration Guide.
For Applications Containing Stateful Session Beans
- Open the sun-ejb-jar.xml file. This configuration file is located at install_dir/domains/domain1/server1/applications/j2ee-apps/application-name_1/application nameEJB_jar/META-INF/
- Replace the existing DOCTYPE declaration
<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems,Inc./DTD Sun ONE Application Server 7.0 EJB 2.0 EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
with
<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems,Inc./DTD Sun ONE Application Server 7.1 EJB 2.0 EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-1.dtd'>- If required, replace the <ejb> tag with <ejb availability-enabled="true">
- If required, specify the checkpointed methods list using "checkpointed-methods" element.
- Save the changes in the file.
For Applications Containing a Web Module
- Open the sun-web-app.xml file. This configuration file is located at install_dir/domains/domain1/server1/applications/j2ee-apps/application-name_1/application name_war/WEB-INF/
- Replace the existing DOCTYPE declaration
<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems,Inc./DTD Sun ONE Application Server 7.0 Servlet 2.3 EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd'>
with
<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems,Inc./DTD Sun ONE Application Server 7.0 Servlet 2.0 EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-1.dtd'>- Replace the tag <session-manager persistence-type="memory/file/custom"/> with <session-manager persistence-type="ha"/>
- Save the changes in the file.