80 likes | 193 Vues
This guide details the deployment of Enterprise applications on IBM WebSphere 5.0, specifically focusing on the setup and structure of a sample application, PetStoreEAR. It covers essential components such as application.xml, ejb-jar.xml, and web.xml configuration files, along with tips for managing servlet classes andEJB references. The guide aims to assist developers in leveraging the Web Application Framework for creating and deploying robust enterprise-level applications effectively.
E N D
Enterprise aplikatsiooni deploy IBM WebSphere 5.0 serverile Ivo Mägi
Aplikatsiooni struktuur applications/<appname>/ META-INF/ application.xml <ejb_module> EJB klassid META-INF/ ejb-jar.xml <web_module>/ index.html JSP pages WEB-INF/ web.xml classes/ Servleti klassid
application.xml ?xml version="1.0" encoding="UTF-8"?> <application id="Application_ID"> <display-name>PetStoreEAR</display-name> <description>The BluePrints Petstore Built On top of the Web Application Framework.</description> <module id="EjbModule_1"> <ejb>petstore-ejb.jar</ejb> </module> <module id="WebModule_1"> <web> <web-uri>petstore.war</web-uri> <context-root>petstore</context-root> </web> </module> </application>
ejb-jar.xml <?xml version="1.0"?> <ejb-jar> <enterprise-beans> <session> <description>Näidis</description> <ejb-name>EmployeeBean</ejb-name> <home>employee.EmployeeHome</home> <remote>employee.Employee</remote> <ejb-class>employee.EmployeeBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Bean</transaction-type> </session> </enterprise-beans> </ejb-jar>
web.xml <?xml version="1.0"?> <web-app> <servlet> <servlet-name>psmain</servlet-name> <servlet-class>ee.et.ps.web.controller.PSServlet</servlet-class> <init-param> <param-name>templates-inlining</param-name> <param-value>false</param-value> </init-param> <servlet-mapping> <servlet-name>psmain</servlet-name> <url-pattern>/psmain</url-pattern> </servlet-mapping> <ejb-ref> <ejb-ref-name>EmployeeBean</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>employee.EmployeeHome</home> <remote>employee.Employee</remote> </ejb-ref> </servlet> </web-app>
WebSphere spetsiifika <appname> META-INF/ ibm-application-bnd.xmi ibm-application-ext.xmi <ejb-module> ibm-ejb-jar-bnd.xmi ibm-ejb-jar-ext.xmi <web-module> ibm-web-bnd.xmi ibm-web-ext.xmi
Paketistruktuuri koostamine • AAT(Application Assembly Tool) • ANT(taskid javac+jar)
Deploy • Administration console • Shelli skriptid