Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-678

RemoteBinding annotation doesn't use the default client binding of the remoting

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • EJB 3.0 RC9 - FD
    • EJB 3.0 RC8 - FD
    • None
    • None

      The org.jboss.annotation.ejb.RemoteBinding annotation configures the jndi binding, interceptor stack, the client bind url and the RemoteProxyFactroy.

      When the jboss remoting service is not configured using the url socket://0.0.0.0:3873 (not listening on the default port or using ssl), the programmer has to specify the the url when he wants to bind the bean to a different jndi context.

      The deployment has to be deployed into different JBoss instances (pre-production, production,...) with different ports, the deployment has to be rebuilt (different jboss.xml) or even recompiled (with different annotation value).

      I propose that the default "socket://0.0.0.0:3873" means the default of the remoting configuration or even better set the default to "" in the annotation which would be interpreted as the default remoting configuration.

      The following fixes the issue using the first described approach:
      org.jboss.ejb3.stateless.ProxyDeployer

      public void initializeRemoteBindingMetadata()

      { remoteBindings = (RemoteBindings) advisor.resolveAnnotation(RemoteBindings.class); if (remoteBindings == null) ... }

      else
      {
      // defaultClientBinding is more accurate that the constant in RemoteBinding
      if ("socket://0.0.0.0:3873".equals(binding.clientBindUrl()))

      { binding = new RemoteBindingImpl(binding.jndiBinding(), binding.interceptorStack(), defaultClientBinding, binding.factory()); }

      RemoteBinding[] list =

      {binding}

      ;
      remoteBindings = new RemoteBindingsImpl(list);
      advisor.getAnnotations().addClassAnnotation(RemoteBindings.class, remoteBindings);
      }
      }
      }

            wdecoste1@redhat.com William Decoste (Inactive)
            wv-javacoder Roland Räz (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: