3 Replies Latest reply on Jun 30, 2005 8:54 AM by katjak

    JNDI over HTTPS fails after upgrade to JBoss 3.2.7

    katjak

      After debugging this a bit, I found out that for some reason, the invocations made by cluster B to the Naming proxy marshalled by cluster A are always handled by the local container. I wrote my own InvokerInterceptor for the delegate session bean calls. It never does local invocations, it just trace logs whenever an invocation is "local", and forwards the invocation to the remote container. Now the application works as it should... but the original problem remains unsolved.

      For some reason, org.jboss.system.Registry.lookup(Object) returns true for session beans that should not exist in cluster B, only in cluster A. The beans do not show up when I call Context.listBindings.

      Perhaps this is a platform-specific problem? We are using Mac OS X 10.3.9 for development. I have two IP's on my machine and have bound each cluster to a separate host name/ip.

        • 1. Re: JNDI over HTTPS fails after upgrade to JBoss 3.2.7
          katjak

          There seems to be a bug in org.jboss.invocation.InvokerInterceptor.isLocal(Invocation). Or at least I am unable to figure out how naming lookups from one JBoss instance to another are supposed to work with this code in InvokerInterceptor:

          public boolean isLocal(Invocation invocation)
          {
          return localInvoker != null && Registry.lookup(invocation.getObjectName()) != null;
          }

          When NamingServer is bound in Registry in all instances with the same id:

          14:17:59,704 DEBUG [HttpProxyFactory] Created HttpInvokerProxy for invoker=jboss:service=Naming, nameHash=349114835

          And when cluster B tries to look up cluster A's naming server in order to find the session bean for which it works as a delegate, Registry always finds the naming server which exists in cluster B with the same id.

          Working code from 3.2.5 InvokerInterceptor:

          public boolean isLocal()
          {
          return invokerID.equals(Invoker.ID);
          }

          I'll write my own implementation of InvokerInterceptor for use in delegate bean lookups, and a LocalInvoker which sets local invoker instance in this custom InvokerInterceptor instance. What I would like to know is am I right, whether what I found is a bug, should I report it, and is there possible problems with reverting to 3.2.5 behaviour for InvokerInterceptor.isLocal().

          • 2. Re: JNDI over HTTPS fails after upgrade to JBoss 3.2.7
            darranl

            Yes you have found a bug.

            http://jira.jboss.com/jira/browse/JBAS-1442

            It is fixed in the 4.0.2 release of JBoss, I haven't had time to check if any related fix has been applied to 3.2.x.

            • 3. Re: JNDI over HTTPS fails after upgrade to JBoss 3.2.7
              katjak

              I see, thanks. I should have found this duplication bug which is marked for 3.2.7: http://jira.jboss.com/jira/browse/JBAS-1495

              Well, served as a crash course to the JBoss remote invocation stack.