Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java EE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 关于JBOSS3.06部署,进,紧急
castnow





发贴: 68
积分: 0
于 2003-04-23 14:49 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
有两个EJB,一个是SESSION,另一个是ENTITY,使用CMP2。0,在JBOSS
部署出错,EJB-JAR和JBOSS文件如下
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>Blacklist manage</display-name>
<enterprise-beans>
<session>
<ejb-name>ejb/BlacklistController</ejb-name>
<home>com.goldencoast.creditsys.ejb.blacklistmanage.BlacklistControllerHome</home>
<remote>com.goldencoast.creditsys.ejb.blacklistmanage.BlacklistController</remote>
<ejb-class>com.goldencoast.creditsys.ejb.blacklistmanage.BlacklistControllerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<!--ejb-ref>
   <ejb-ref-name>ejb-ref/Blacklist</ejb-ref-name>
   <ejb-ref-type>Entity</ejb-ref-type>
   <jndi-name>blacklistmanage/Blacklist</jndi-name>
  </ejb-ref-->
<!--resource-ref>
  <res-ref-name>jdbc/TransactDS</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
   <jndi-name/>
   <res-url/>
  </resource-ref-->
</session>
<entity>
<ejb-name>ejb/Blacklist</ejb-name>
<home>com.goldencoast.creditsys.ejb.blacklistmanage.BlacklistHome</home>
<remote>com.goldencoast.creditsys.ejb.blacklistmanage.Blacklist</remote>
<ejb-class>com.goldencoast.creditsys.ejb.blacklistmanage.BlacklistBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>blacklist</abstract-schema-name>
<cmp-version>2.x</cmp-version>
<cmp-field>
<field-name>recordId</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<cmp-field>
<field-name>creditId</field-name>
</cmp-field>
<cmp-field>
<field-name>driveCard</field-name>
</cmp-field>
<cmp-field>
<field-name>idCard</field-name>
</cmp-field>
<cmp-field>
<field-name>crimeRecord</field-name>
</cmp-field>
<cmp-field>
<field-name>remark</field-name>
</cmp-field>
<primkey-field>recordId</primkey-field>
<query>
<query-method>
<method-name>findByPrimaryKey</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<!--method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param-->
</method-params>
</query-method>
<ejb-ql><![CDATA[select Object(b) form blacklist as b where recordId=?1]]>
</ejb-ql>
</query>
<!--resource-ref>
  <res-ref-name>jdbc/TransactDS</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
   <jndi-name/>
   <res-url/>
  </resource-ref-->
</entity>
</enterprise-beans>
<resource-managers>
<!--resource-manager res-class="">
<res-name>TransactDS</res-name>
<res-jndi-name>java:/TransactDS</res-jndi-name>
</resource-manager-->
</resource-managers>
<assembly-descriptor>
<container-transaction>
<description>Transaction attributes for 'ejb/Blacklist' methods</description>
<method>
<ejb-name>ejb/Blacklist</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<description>Transaction attributes for 'ejb/BlacklistController' methods</description>
<method>
<ejb-name>ejb/BlacklistController</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>


jboss.xml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 3.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">

<jboss>
  <enterprise-beans>
    <entity>
      <ejb-name>ejb/Blacklist</ejb-name>
      <jndi-name>blacklistmanage/Blacklist</jndi-name>
     <!--resource-ref>
        <res-ref-name>jdbc/TransactDS</res-ref-name>
        <resource-name>TransactDS</resource-name>
        <jndi-name/>
        <res-url/>
      </resource-ref-->
    </entity>
    <session>
      <ejb-name>ejb/BlacklistController</ejb-name>
      <jndi-name>blacklistmanage/BlacklistController</jndi-name>
      <!--ejb-ref>
        <ejb-ref-name>ejb-ref/Blacklist</ejb-ref-name>
        <jndi-name>blacklistmanage/Blacklist</jndi-name>
      </ejb-ref-->
      <!--resource-ref>
        <res-ref-name>jdbc/TransactDS</res-ref-name>
        <resource-name>TransactDS</resource-name>
        <jndi-name/>
        <res-url/>
      </resource-ref-->
    </session>
  </enterprise-beans>

<resource-managers>
<!--resource-manager res-class="">
<res-name>TransactDS</res-name>
<res-jndi-name>java:/TransactDS</res-jndi-name>
</resource-manager-->
</resource-managers>

</jboss>


why edited on 2003-04-23 19:50


CJSDNer6月14日北京聚会花絮

话题树型展开
人气 标题 作者 字数 发贴时间
2878 关于JBOSS3.06部署,进,紧急 castnow 6994 2003-04-23 14:49

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923