[jboss-dev-forums] [Design of EJB 3.0] - Re: @RemoteBindings and clientBindUrl - JNDI binding questio

ALRubinger do-not-reply at jboss.com
Mon Jul 28 23:16:06 EDT 2008


"wolfc" wrote : 2. The relationship between remote business interfaces and remote bindings is as of yet not properly specified. 

True statement.

"wolfc" wrote : The goal is to give the bean developer the ability to specify a client bind url per remote business interface

Did you make that up just now?  Where is this defined? :)  Kinda goes against the idea of @RemoteBinding(s) at the class-level.

Historically, we've only made available one type of Proxy in JNDI (for each local and remote), which supported EJB2.x Interfaces, EJB2.x Home Interfaces, and EJB3 Business Interfaces.  Now we have:

* Eliminated the binding of EJB2.x Proxies entirely (they may only be obtained via Home.create())
* An EJB3.0 Business Default Business Proxy (the most widely-used client lookup target, which supports each of the business interfaces bound)
* An EJB3.0 Business Interface-Specific Proxy (one per bound business interface, these are used as injection/ENC lookup targets and are loaded with the stuff that gives getInvokedBusinessInterface() contextual information).
* An EJB2.x Home Proxy, which may be bound to the same Proxy as the EJB3 Default Business Interface.

So I read many @RemoteBindings as targeted to expose any N number of bindings for the Default Business Interface Proxy.

So if we have:

@RemoteBinding(jndiBinding="Busi1")
  | public interface MyBusinessInterface1{...}
  | 
  | @RemoteBinding(jndiBinding="Busi2")
  | public interface MyBusinessInterface2{...}
  | 
  | public interface MyBusinessInterface3{...}
  | 
  | @Stateless
  | @RemoteBindings({
  |   @RemoteBinding(jndiBinding="MyBean")
  |   @RemoteBinding(jndiBinding="MySSLBean", clientBindUrl="sslsocket://0.0.0.0:3843")
  | })
  | public class MyBean implements MyBusinessInterface1, MyBusinessInterface2, MyBusinessInterface3{...}

..then we've defined @RemoteBindings at both the interface and EJB level.  As a user I'd expect to find in the JNDI Tree:

+ Busi1 (Proxy implements MyBusinessInterface1)
  | + Busi2 (Proxy implements MyBusinessInterface2)
  | + MyBean (Proxy implements MyBusinessInterface1, MyBusinessInterface2, MyBusinessInterface3)
  | + MySSLBean ((Proxy implements MyBusinessInterface1, MyBusinessInterface2, MyBusinessInterface3) < Exposes SSL Transport

This way, an interface-targeted JNDI Binding is specified at the interface level, and any @RemoteBinding(s) on the class level apply to all Remote Business Interfaces.  And it'd require no API changes.

S,
ALR

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167201#4167201

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167201



More information about the jboss-dev-forums mailing list