5 Replies Latest reply on Apr 24, 2003 3:18 PM by adrian.brock

    ServiceConfigurator & EJB Deployment Descriptor Q

    paulbandler

      Can the ServiceConfigurator over-ride values specified in EJB deployment descriptors? For example in the resource-manager definition below from an EJB specific jboss.xml there is a hostname and port number that needs to be specified on a per JBoss Instance/EJB service basis.

      <resource-managers>
      <resource-manager>
      <res-name>SinkConnectionFactory</res-name>
      <res-jndi-name>java:/Testrig2SinkJms</res-jndi-name>
      </resource-manager>
      <resource-manager>
      <res-name>SinkQueue</res-name>
      <res-jndi-name>jnp://localhost:1099/queue/A</res-jndi-name>
      </resource-manager>
      </resource-managers>

        • 1. Re: ServiceConfigurator & EJB Deployment Descriptor Q

          Unfortuntley not.

          You could use the MBean
          org.jboss.naming.ExternalContext
          to bring the remote context into the local jndi
          tree.

          Regards,
          Adrian

          • 2. Re: ServiceConfigurator & EJB Deployment Descriptor Q
            paulbandler

            > Unfortuntley not.
            >
            > You could use the MBean
            > org.jboss.naming.ExternalContext
            > to bring the remote context into the local jndi
            > tree.

            Thanks for the suggestion Adrian.

            But will it be possible to bind that remote context into the ENC of the MessageBean or would it have to go into the Global JNDI namespace?

            Cheers,

            Paul

            • 3. Re: ServiceConfigurator & EJB Deployment Descriptor Q

              Not directly,
              you can bind the external context into global jndi
              then configure ENC in the usual way, i.e.
              a the global jndi name.

              Regards,
              Adrian

              • 4. Re: ServiceConfigurator & EJB Deployment Descriptor Q
                paulbandler

                > Not directly,
                > you can bind the external context into global jndi
                > then configure ENC in the usual way, i.e.
                > a the global jndi name.

                That's great - many thnx - it works exactly as I'd like it to and means I can remove remote hostnames/address/port numbers from my EJB descriptors.

                One minor gottcha occurs if you define the ExternalContext::RemoteAccess property==true and have (as my application has) two 'sibling' systems with ExternalContext references to each other. Invoking the JNDIView::list service puts both systems into a spin as I assume it chases the reference round and round. Setting RemoteAccess == false avoids this problem. Should I put a bug report in for this behavior?

                • 5. Re: ServiceConfigurator & EJB Deployment Descriptor Q

                  You could post a bug report,
                  but it is really a user error for configuring
                  a recursive jndi.

                  I'm not sure it would be easy to detect
                  this definition, it could in principle hop over
                  any number of servers before returning to the
                  original. :-)

                  Regards,
                  Adrian