4.ejb-jar.xml文件
<?xml version="1.0" encoding="gbk"?>
<!doctype ejb-jar public -//sun microsystems, inc.//dtd enterprise javabeans 1.1//en http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>resultedit</ejb-name>
<home>com.sitechasia.ejb.resultedithome</home>
<remote>com.sitechasia.ejb.resultedit</remote>
<ejb-class>com.sitechasia.ejb.resulteditbean</ejb-class>
<session-type>stateful</session-type>
<transaction-type>container</transaction-type>
<resource-ref>
<res-ref-name>imis</res-ref-name>
<res-type>javax.sql.datasource</res-type>
<res-auth>application</res-auth>
</resource-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>resultedit</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
5.weblogic-ejb-jar.xml文件
<?xml version="1.0"?>
<!doctype weblogic-ejb-jar public -//bea systems, inc.//dtd weblogic 5.1.0 ejb//en http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>resultedit</ejb-name>
<reference-descriptor>
<resource-description>
<res-ref-name>
imis
</res-ref-name>
<jndi-name>
imis_jndi
</jndi-name>
</resource-description>
</reference-descriptor>
<jndi-name>resultedit</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
6.build.cmd文件
@rem copyright (c) 2000 bea systems, inc. all rights reserved.
@rem you must set your environment by running the setcabinsenv shell script
@rem prior to executing this script.
@rem create the build directory, and copy the deployment descriptors into it
mkdir build build\meta-inf
copy *.xml build\meta-inf
@rem compile ejb classes into the build directory (jar preparation)
javac -d build resultedit.java resultedithome.java resulteditbean.java
@rem make a ejb jar file, including xml deployment descriptors
cd build
jar cv0f resultedit.jar meta-inf com
cd ..
@rem run ejbc on jar file
java -classpath %classpath%;%weblogic_home%/lib/weblogic_sp.jar;%weblogic_home%/lib/weblogic.jar weblogic.ejbc -compiler javac build\resultedit.jar %weblogic_home%\config\mydomain\applications\resultedit.jar
@rem compile servlets and ejb interfaces into web-inf/classes directory of the cabins web app
@rem this ensures that the ejb can be accessed by jsps and servlets of the cabins web app
