On Oct 4, 2006, at 8:27 AM, Matt Hogstrom wrote:


On Oct 1, 2006, at 8:16 PM, David Jencks wrote:


For connectors it's pretty easy, we can just have a repeating element
<global-jndi-name>foo</global-jndi-name>

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.

What if the user specifies a single name that would bind into all naming systems by default (as appropriate). If the user chooses to be more specific or isolated in the bindings they could through some extended XML. So one could use something like:

Bean w/remote and local interfaces.
<jndi>
  <name>foo</name>
</jndi>

This would result in the same name being bound into the corba, remote and local naming. I'd make global the default context although that could be argued.

Perhaps one could simply bind the EJBName into all three contexts and not have to specify this property at all.

Not knowing too much about the naming stuff I may be off the mark a bit. But I'd make the defaults for no XML the most common so we improve simplicity.

Read my proposal as it has the same goal as what you mention; you just specify the name for the interface and it's bound to all applicable naming services with that name. The only technical issue with your proposal is that a bean doesn't have just one interface per naming service. If you connect to JNDI via the o.a.openejb.client.LocalInitialContextFactory, for example, you can lookup a bean via it's remote home, local home, business remote (ejb3), or business local (ejb3) interfaces. Same would go for Geronimo's global JNDI.

That said, in an even older email, I also mention this:

On Aug 7, 2006, at 7:38 PM, David Blevins wrote:
As far as specifying the names goes, we should still have some sort of strategy for automatically creating the jndi-names for each interfaces for people who don't really care as long as they don't have to type them in. This has been something i've wanted to do for a while. We do it already, but it should be completely configurable at a system or ejb-jar. The explicitly set names would always win over the templated names.

Thoughts?

-David

Reply via email to