1 Reply Latest reply on Dec 23, 2002 8:05 AM by adrian.brock

    Is it normal?

    fwang49


      Hi,

      I am a new user of JBoss 3.0.4. I am playing with
      a very simple "echo" stateless session bean.

      I find one interesting thing in the deployment. I have
      tried three cases.

      Assume that we have a ejb-jar.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!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>
      <display-name>EchoJAR</display-name>
      <enterprise-beans>

      <display-name>EchoEJB</display-name>
      <ejb-name>EchoEJBX</ejb-name>
      EchoHome
      Echo
      <ejb-class>EchoBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>
      <security-identity>

      <use-caller-identity></use-caller-identity>
      </security-identity>

      </enterprise-beans>
      </ejb-jar>

      case 1: deployment successful
      And if the jboss.xml is like :

      <enterprise-bean>

      <ejb-name>EchoEJBY</ejb-name>
      <jndi-name>ejb/EchoBean1</jndi-name>

      </enterprise-bean>


      In the jmx-console view, the bound name will be
      like "jndiName=EchoEJBX,service=EJB".

      case 2: deployment failed
      And if the jboss.xml is like :

      <enterprise-beans>

      <ejb-name>EchoEJBY</ejb-name>
      <jndi-name>ejb/EchoBean1</jndi-name>

      </enterprise-beans>

      It complained that <ejb-name> in ejb-jar.xml and jboss.xml are not the the same.

      case3: deployment successful
      And if the jboss.xml is like :

      <enterprise-beans>

      <ejb-name>EchoEJBX</ejb-name>
      <jndi-name>ejb/EchoBean1</jndi-name>

      </enterprise-beans>


      In the jmx-console view, the bound name will be
      like "jndiName=ejb/EchoBean1,service=EJB".

      Can somebody explain why case1 and case3 are different?
      Since this will influence what name that the client should use to lookup the home interface, what is the recommended way?

      Thanks a lot

      Feng

        • 1. Re: Is it normal?

          case 1 you specified <enterprise-bean> so
          the whole section was ignored.

          case 2 you had EJBEchoY in jboss.xml with no
          corresponding bean in ejb-jar.xml

          case 3 you did it correctly.

          Regards,
          Adrian