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

  • 相关阅读:
    CentOS查看系统信息和资源使用已经升级系统的命令
    192M内存的VPS,安装Centos 6 minimal x86,无法安装node.js
    Linux限制资源使用的方法
    多域名绑定同一IP地址,Node.js来实现
    iOS 百度地图大头针使用
    iOS 从app跳转到Safari、从app打开电话呼叫
    设置cell背景色半透明
    AsyncSocket 使用
    iOS 监听键盘变化
    iOS 7 标签栏控制器进行模态视图跳转后变成透明
  • 原文地址:https://www.cnblogs.com/wucg/p/4037580.html
Copyright © 2011-2022 走看看