Oh no sorry, I didn't mean that (using the context object), that would break the whole beauty ...
... but then I get it ... if you know the cntainer you will be inside, is because you know how your component will be needed ... if is so, then I can take it from here, because then is about learning how the contract between the container and the components works ... isn't ...
and one more question? is jetty part of the whole thing or is just a standard component you have to include?
Saludos maquina
From: J Aaron Farr <[EMAIL PROTECTED]> Reply-To: "Avalon framework users" <[EMAIL PROTECTED]> To: Avalon framework users <[EMAIL PROTECTED]> Subject: Re: context Date: Wed, 24 Nov 2004 09:44:42 -0500
Samuel Ferrer wrote:
Thank you very much ...
I wander ... that mapping is a very simple class like a Hashtable isn't ... no need for anything else?
Under the covers, yes, it's a Map implementation. But the Context is read-only for components.
How does the container publish the properties ... via a documentation obtained some how ... ex like is done in web services?
For existing Avalon containers, the properties are only available via the Context object, though one could write a JNDI adaptor. Here's a typical example:
public class MyComponent extends AbstractLogEnabled implements MyService, Contextualizeable {
public MyService(){ }
public void contextualize(Context context) throws ContextException { File home = (File) context.get("impl.workDir"); ... }
...
}
This example would work in Excalibur Fortress. Getting context objects is very similar to getting other components via the ServiceManager. However, since there is no standard set of context entries, you need to know what container you plan to use and program accordingly. Consequently, using the context object is often discouraged because it ties you to a container implementation.
jaaron
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]