a.开发环境:websphere6.1、myeclipse
注意:websphere6.1本没有对ejb3.0进行支持,需要到网站上下载
1.补丁安装工具?updateinstall?http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg24012718
2.补丁http://www-01.ibm.com/support/docview.wss?rs=180&context=SSEQTP&uid=swg27004980
?
b.生成ear包。
1.myeclipse 新建entines project,选择ejb工程,web工程
2.引用其他jar:目录结构:
META-INF=>MANIFEST.MF(注意该文件的格式)
Manifest-Version: 1.0
Class-Path: jdom.jar log4j-1.2.8.jar toolkit.jar
?
?
ejb-jar->META-INF->MANIFEST.MF相同
?
ejb-jar.xml
?
?
<?xml version="1.0" encoding="UTF-8"?> <ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"> <display-name> identychangeEJB</display-name> <enterprise-beans> <message-driven id="SubscriberDMDB"> <display-name> SubscriberMDB_IdentyChange</display-name> <ejb-name>SubscriberMDB_IdentyChange</ejb-name> <ejb-class>com.taikang.identychange.ejb.IdentificationChangedMDB</ejb-class> <messaging-type>javax.jms.MessageListener</messaging-type> <transaction-type>Bean</transaction-type> <message-destination-type>javax.jms.Topic</message-destination-type> <activation-config> <activation-config-property> <activation-config-property-name>acknowledgeMode</activation-config-property-name> <activation-config-property-value>Auto-acknowledge</activation-config-property-value> </activation-config-property> <activation-config-property> <activation-config-property-name>destinationType</activation-config-property-name> <activation-config-property-value>javax.jms.Topic</activation-config-property-value> </activation-config-property> <activation-config-property> <activation-config-property-name>subscriptionDurability</activation-config-property-name> <activation-config-property-value>Durable</activation-config-property-value> </activation-config-property> </activation-config> <env-entry> <env-entry-name>jndi-datasource-name</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>jdbc/InsureDB</env-entry-value> </env-entry> <resource-ref id="ResourceRef_1254203818020"> <description>Database reference for insure application</description> <res-ref-name>jdbc/InsureDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> </message-driven> </enterprise-beans> </ejb-jar>?
?