[jboss-dev-forums] [Design of EJB 3.0] - Re: Kill Default Remote Binding if 1+ @RemoteBinding is spec
ALRubinger
do-not-reply at jboss.com
Fri Oct 24 09:32:30 EDT 2008
"wolfc" wrote : What happens if:
| @Stateless(name="MyBean")
| | @Local(MyLocal.class)
| | @Remote(MyRemote.class)
| | @RemoteBinding(jndiBinding="MyBean")
| | class MyBean{...}
I thought of something similar to this after going to bed last night.
We need to reserve the namespace used by default bindings. Your example above shows a collision:
MyBean - Explicit from MyBean
| MyBean/local - Default Local Business
...but also there's the stuff under the namespace:
MyBean/remote-MyRemote.class
So the rule's gotta be twofold:
* If at least 1 @RemoteBinding is specified, skip binding of default remote business location
* @LocalBinding and @RemoteBinding must not interfere with the namespace
This is all dependent upon the binding namespace; I'm assuming a JAR packaging above. In an EAR this all becomes prefixed w/ "[earName/".
Keep in mind that the idea of a "namespace" is provided by our implementation details ie. BasicJndiBindingPolicy, and other JNDI Binding Policies may not have this restriction. So we cannot validate against the namespace itself as a validation check; we'd have to validate all of the targeted JNDI bindings against each other to check for conflicts. Skipping the validation check just throws a CCE from Context.bind, which doesn't tell the user too much.
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184479#4184479
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184479
More information about the jboss-dev-forums
mailing list