-
Feature Request
-
Resolution: Done
-
Major
-
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()))
RemoteBinding[] list =
{binding};
remoteBindings = new RemoteBindingsImpl(list);
advisor.getAnnotations().addClassAnnotation(RemoteBindings.class, remoteBindings);
}
}
}