> From: Leo Sutic [mailto:[EMAIL PROTECTED]] 
> 
> How about this then:
> 
> Define all publishing to be global and via JNDI.
> 
> A container is told to publish services X, Y and Z, and to 
> bind them to certain points in the JNDI context:
> 
>   <publish service="<service id>" as="java:/SomeName"/>
>   <publish service="<other service id>" as="java:/SomeOtherName"/>
> 
> and in the super-container:
> 
>   <import service="<service id>" from="java:/SomeName"/>
>   <import service="<other service id>" from="java:/SomeOtherName"/>
> 
> The super-container can then access these services via JNDI 
> and import them into its namespace that way.

That is the J2EE Style publishing I talked about in the first section.

To keep things predictable, I would put it in this namespace:

"avalon:/services/${service-name}"

Once it is in JNDI, which can ONLY be assigned during initialization,
it is accessible via JNDI so there is no need to <import/>.

We might have to use container names in the lookup key to prevent
name collisions--or at the very least not allow the new service
to be bound if it conflicts with something.  Rebinding and entry
deletions can only be permitted by the container that bound it
in the first place.

If you want to access a globally accessible service, you get an
InitialContext()

It does need a bit more discussion.


> > You also missed out on a bunch of good stuff because you have
> > already decided in your mind that you want to publish 
> > interfaces. You will kill whatever hopes of success you have 
> > when you make up your mind and *refuse* to hear any other 
> conclusion.
> 
> The only thing I'm saying is that publishing *does* have a 
> place in the Avalon architecture, and that it *can* be done 
> in a predictable and secure way.

Right, which is getting back to the J2EE style publication.


> Take a look at the publishing-via-JNDI above and tell me if it seems 
> OK.


Sure, because there is a precedent for it called J2EE.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to