On Oct 2, 2006, at 10:00 AM, David Blevins wrote:


On Oct 1, 2006, at 11:16 AM, David Jencks wrote:
For ejbs with the current 3 naming systems it's a bit harder. One possibility would look something like this:

<jndi>
  <global/>
  <corba>
     <tss-link>foo-tss</tss-link>
  </corba>
  <openejb/>
  <remote-name>foo</remote-name>
  <local-name>bar</local-name>
</jndi>

where the global, corba, and openejb elements indicate which naming system to bind to and the names are supplied with remote- name and local-name. A remote jndi would ignore the local-name elements. You could have multiple jndi elements to get different bindings in different naming systems.

To make this extensible the naming system elements would have to be in a substitution group and extend an abstract element. The ones we know about now could all be in the same namespace.


Thoughts?

There was a discussion on this in context of OpenEJB 3. It was short and no real conclusion was made, but let me see if I can't dig it up.


Alright, here is that discussion http://marc.theaimsgroup.com/? l=openejb-development&m=115500473129558&w=2
Dunno how much relates, but it's worth reading the tail end at least.

In that I had proposed essentially:

<jndi-name interface="some.bean.SomeBeanLocalHomeInterface">some/ jndi/name/SomeBeanLocalHome</jndi-name> <jndi-name interface="some.bean.SomeBeanRemoteHomeInterface">some/ jndi/name/SomeBeanRemoteHome</jndi-name> <jndi-name interface="some.bean.SomeBeanRemoteBusinessInterface">some/jndi/name/ SomeBeanRemoteBizIntfc</jndi-name> <jndi-name interface="some.bean.SomeBeanLocalBusinessInterface">some/jndi/name/ SomeBeanLocalBizIntfc</jndi-name>

The only wrapper element would be the bean definition, really don't need a "<jndi>" wrapper element. Though we could have one.

A partial motivation for 'interface' as an attribute is that in the ejb3 schema a bean can have unlimited number of business interfaces. Not sure if this was really the intention -- we'll find out at certification time I guess.

I thought I had an attribute in there that specified the consuming protocol ( <jndi-name protocol="foo"), but I guess I did not add that. I guess I was thinking that you could figure out what to do with the interface based on the data in ejb-jar (service-endpoint, remote, local, etc) and in the interface class itself (annotations, super interface types).

Though it may be good to have an optional "protocol='foo'" attribute where the lack of it implied "all available and applicable protocols". Just thinking it would be a bummer to have to supply jndi names for the corba, openejb remote protocol, and internal global JNDI trees for a plain remote interface, for example, as all three names could really be the same -- you'd probably only want the option to make them different.

Thoughts on that basic premise?

Anyway, lots of things we could do here. I threw up this wiki page so we could brain storm more:

http://cwiki.apache.org/confluence/display/OPENEJB/JNDI+Name+Config

Add any options or variations you think may be attractive.

-David



Reply via email to