avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@realityforge.org>
Subject Re: Context: usage recommendations? ( Re: [SUMMARY] Context )
Date Thu, 05 Dec 2002 11:36:22 GMT
On Thu, 5 Dec 2002 12:08, Adam Murdoch wrote:
> Is this such a problem now that all the containers support auto-assembly,
> where the assembler's view goes from 'container-supplied vs
> application-supplied' to 'automatically-supplied vs explicitly-supplied'?

It is possible but I prefer to make things simpler for users. Requiring tools 
because the underlying tech is not as simple as possible (and no simpler) 
makes me go ick. Look to EJB to see a technology where you need oodles of 
configurable tools ala EJBGen/XDoclet to just do basic things. And even then 
it is a quagmire of complexity.

> > If the services are things that the container provides to the component
> > as part of it's environment then the user perceives them as different to
> > services that the component uses. I can't think of one API that actually
> > merges the two concepts.
> Here's a couple:
> * EJBs and DataSources are both delivered via JNDI.

They are both services.

> * Myrmidon's TaskContext.getService() provides access to both container
> services and antlib-contributed services.

But Myrmidon did not allow asssemblers to map in services to tasks. Tasks just 
access an existing set of services and as far as the task is concerned they 
are all container provided. 

The fact that a task could modify the set of container tasks for other tasks 
not withstanding ;)

> Don't forget that many domain-specific APIs (mailets, for example) don't
> provide *any* access to arbitrary services, and so can't go merging them
> with container provided services.

EJBs/Servlets do. They both provide access to arbitary resources via JNDI. 
They also access container-specific services via context... sorta.

Actually EJBs (and Servlets?) actually provide most container-specific 
services via context except for transactions in which they expose container 
specific UserTransaction (or whatyever it is called) in JNDI.


Peter Donald
| "The whole problem with the world is that fools and  |
| fanatics are always so certain of themselves, but    |
| wiser people so full of doubts." - Bertand Russle    |

To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message