欢迎光临
我们一直在努力

用Java实现可保存状态的数据库生成XML树(8)-JSP教程,Java与XML

建站超值云服务器,限时71元/月

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
 

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 用Java实现可保存状态的数据库生成XML树(8)-JSP教程,Java与XML
分享到: 更多 (0)

相关推荐

  • 暂无文章