0 Replies Latest reply on Jul 24, 2003 12:13 AM by jboss-x

    Which version is JBoss's XML parser?

    jboss-x Newbie


      I don't think that you can do what you want using the descriptors.

      The JNDI names that are visible on the remote J2EE server will always be the "plain vanilla" names. Only an instance of an EJB on the remote server will be able to access the "java:comp/env" namespace of that instance.

      If you really need the indirection, you could write a Facade EJB for the remote instance whose sole function is to receive a method call, look up another JNDI name in its "java:comp/env" namespace, pass on the method call and then return the response.

      So the bare bones of a sample method would look like :-

      getTaxRate( String taxCode ) {
      TaxHome home = (TaxHome) ctx.lookup( "java:comp/env/ejb/taxserver" );
      return home.create().getTaxRate( taxCode );

      This EJB would, of course, be a stateless session bean.

      The Facade EJB can then be declared as the public facade for the service, whilst you have the ability to redirect to an internal implementation by setting up EJB links in ejb-jar.xml.

      I haven't tried this, but it should work. Putting a Facade in place would also free you to change the coding of the internal implementation if necessary.