1 Reply Latest reply on May 11, 2004 2:45 AM by tokobayashi

    ByValueInvokerInterceptor and java.naming.provider.url

      Hi,

      I deploy EAR1(includes 1 EJB-JAR) and EAR2(includes 1 WAR).loader-repository is sepalated by using jboss-app.xml.EJB-JAR's jboss.xml is configured with ByValueInvokerInterceptor for "call-by-value".

      In EJBClient(=WAR), InitialContext is instantiated without any argument.

      When I put jndi.properties into WAR,

      ### jndi.properties ###
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://localhost:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      ################

      works fine.

      But, without jndi.properties,
      (I know, it results java.naming.provider.url=null)
      I get the familiar ClassCastException.

      java.lang.ClassCastException
      at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
      at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
      at testservlet.TestServlet.getHome(TestServlet.java:97)
      at testservlet.TestServlet.doPost(TestServlet.java:66)
      at testservlet.TestServlet.doGet(TestServlet.java:50)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      ...

      It looks like "java.naming.provider.url=null" forces JBoss to ignore the "call-by-value" setting.
      Is this an expected behavior?