Hi Piyush,

The application context do internal "inherit" from the parent context, but
this is intentionally not exposed.

1) In this case I would propose two solutions: make this resource remotely
accessible and use a client connector in other applications to access it.
Or, use a shared storage area between all applications like a database (db4o
works well and has a cache) or a standalone cache mechanism
(http://java-source.net/open-source/cache-solutions). Keep in mind that your
application should be deployable into several logical/physical containers at
the same time, for example for fail-over or load-balancing purpose. The last
thing I want to do is reintroduce the session mechanisms from the Servlets.

2) I think we can already do this today. Let's say that you get a Restlet
Application in a JAR. You could create your own Application class, extending
the JAR's Application and addind some specific filters, routers in the
createRoot() method. You can then create and reattach the original
Application's root.

Best regards,
Jerome  

> -----Message d'origine-----
> De : Piyush Purang [mailto:[EMAIL PROTECTED] 
> Envoyé : jeudi 7 décembre 2006 13:49
> À : [email protected]
> Objet : Re: Applications
> 
> Hi Jerome,
> 
> At first I though that the first requirement would already have met
> because of a common container context... Here are the use cases..
> 
> 1) Sharing resources: Suppose I have a very expensive resource that is
> not only accessed (multiple times) but also managed within the same
> physical container then I might have an application that initializes
> and manages that resource and then publishes it for other applications
> to use. Makes sense?
> 
> 2) Hierarchical Applications: Let's say i deploy an application X that
> is an open source application and then i want to extend it without
> necessarily tweaking X. So  I develop an application  Y that is
> "based" on X. Being based on X I inherit the classloader  and hence
> all the resources of X and also its configuration .. Y then overrides
> parts of  X and also perhaps adds more behavior.  Does that make
> sense?
> 
> Now if we have implemented 2) I think 1) will follow as we could
> create an application A that  manages the resource and child
> applications have access to application A. And singeltons aren't a
> solution.
> 
> As for "security" an application can be final i.e. it can't 
> be extended.
> 
> Cheers
> Piyush

Reply via email to