0831【总结】有关在eclipse、lomboz和jboss下的J2EE-EJB

http://www.tusc.com.au/tutorial/html/chap1.html

1。 stateless sessionBean(chap3)

        a。例子中的ejbGenerate。xml对应于实际的xdoclet。xml 。 这是lomboz用于生成生成需要的接口或助手类的文件,需要在jboss的对应位置做对应的修改,比如:

   
            version="3.0"
            unauthenticatedPrincipal="nobody"
            xmlencoding="UTF-8"
            destdir="${ejb.dd.dir}"
            validatexml="false"  
         datasource="java:/EJBTEST"
            datasourcemapping="Hypersonic SQL"
            preferredrelationmapping="forgein-key"
          />

        b。在sessionbean(例子中的StoreAccessBean)中的注释:

   @ejb.dao class="au.com.tusc.session.StoreAccessDAO"
    impl-class="au.com.tusc.dao.StoreAccessDAOImpl"

              生成:1。接口StoreAccessDAO  2。实现类StoreAccessDAOImpl

              原有的注释:

@ejb.bean name ="StoreAccess"
jndi-name="StoreAccessBean"
type="Stateless"

               生成ejb-jar。xml中的有关接口的定义和jboss。xml中的有关jndi的定义

具体的userlogin和init的实现在StoreAccessDAOImpl中完成(?层 ,bussiness method?)

 

 

  1. @ejb.bean tag provides information about the EJB. It is the one compulsory tag for all EJBs.

  2. @ejb.persistence tag is being used at two levels, at class level and method level. At class level it provides information about the persistence of a CMP entity bean, that is which database table this bean is going to interact with, which will provide that persistence. At method level it provides information about the mapping of the bean's persistent attributes to columns in that database table.

  3. @ejb.finder tag defines a finder method for the home interface. This requires the EJB QL query to fetch the data and a signature for the method. This tag can be used for multiple finder methods.

  4. @ejb.persistence-field method level tag is being deprecated in favour of @ejb.persistence tag, it provided information about persistent fields.

  5. @ejb.pk-field tag defines the primary key.

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值