zoukankan      html  css  js  c++  java
  • 第一个EJB示例

    FirstEJB2.0.zip

    Eclipse + JBoss 5.1

    Ejb3Example.zip

    Eclipse + JBoss 7.1

    注意点:

    1. jboss 增加用户:

    D:DevProgramsjbossjboss-as-7.1.1.Finalin>add-user.bat
    
    What type of user do you wish to add?
     a) Management User (mgmt-users.properties)
     b) Application User (application-users.properties)
    (a): b
    
    Enter the details of the new user to add.
    Realm (ApplicationRealm) :
    Username : cg
    Password :
    Re-enter Password :
    What roles do you want this user to belong to? (Please enter a comma separated l
    ist, or leave blank for none) : testrole
    About to add user 'cg' for realm 'ApplicationRealm'
    Is this correct yes/no? yes
    Added user 'cg' to file 'D:DevProgramsjbossjboss-as-7.1.1.Finalstandaloneco
    nfigurationapplication-users.properties'
    Added user 'cg' to file 'D:DevProgramsjbossjboss-as-7.1.1.Finaldomainconfig
    urationapplication-users.properties'
    Added user 'cg' with roles testrole to file 'D:DevProgramsjbossjboss-as-7.1.1
    .Finalstandaloneconfigurationapplication-roles.properties'
    Added user 'cg' with roles testrole to file 'D:DevProgramsjbossjboss-as-7.1.1
    .Finaldomainconfigurationapplication-roles.properties'
    Press any key to continue . . .
    

      

    2.  jboss-as-7.1.1.Finalstandaloneconfigurationstandalone.xml

        <interfaces>
            <interface name="management">
                <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
            </interface>
            <interface name="public">
                <inet-address value="${jboss.bind.address:0.0.0.0}"/>
            </interface>
            <interface name="unsecure">
                <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
            </interface>
    		<-- add begin -->
            <interface name="any">
                <any-ipv4-address/>
            </interface>
    		<-- add end -->
        </interfaces>
    	<!--default-interface="public" 改为 default-interface="any"  >
        <socket-binding-group name="standard-sockets" default-interface="any" port-offset="${jboss.socket.binding.port-offset:0}">
    

    3. EJB Client项目要引用:  jboss-as-7.1.1.Finalinclientjboss-client.jar

    PS:

    ejb查找名:
    ejb:<app-name>/<module-name>/<distinct-name>/<bean-name>!<fully-qualified-classname-of-the-remote-interface>
    ejb stateful:
    ejb:<app-name>/<module-name>/<distinct-name>/<bean-name>!<fully-qualified-classname-of-the-remote-interface>?stateful

  • 相关阅读:
    Linux 学习 step by step (1)
    ubuntu server nginx 安装与配置
    ubuntu server samba服务器配置
    iOS app集成支付宝支付流程及后台php订单签名处理
    mac 连接windows 共享内容
    linux 文件查找,which,whereis,locate,find
    ubuntu server vsftpd 虚拟用户及目录
    ubuntu server 安装 mantis bug tracker 中文配置
    ubuntu server vsftpd 匿名用户上传下载及目录设置
    linux 用户管理,用户权限管理,用户组管理
  • 原文地址:https://www.cnblogs.com/wucg/p/4037580.html
Copyright © 2011-2022 走看看