On startup, Tapestry stores the Registry into the ServletContext. If
you can get to the servlet context, you can get the Registry.

The key is org.apache.tapestry5.application-registry or use the
constant TapestryFilter.REGISTRY_CONTEXT_NAME.

On Thu, Sep 8, 2011 at 8:59 AM, Wechsung, Wulf <wulf.wechs...@sap.com> wrote:
> Hello Guys,
>
> I'm wondering, in a Tapestry Webapp scenario, how is it possible to obtain a 
> reference to the IOC Registry for a (or all) currently loaded module(s). I 
> know about RegistryBuilder but build() says to only call it once. Looking at 
> the source code, it does not seem to be caching the Registries. Is it at all 
> possible to obtain a reference to Registry that already exists in the same VM?
>
> Here is some background on what I'm trying to do:
> I need to make a class that implements some stateless validation logic that 
> uses a service that is bound and configured in my tapestry web module.  This 
> class cannot be itself under tapestry control because it 's being 
> instantiated by other, also non tapestry code. Since the logic in that class 
> is supposed to execute quickly, it's also not feasible to perform a registry 
> build and startup every time. The instances of my class also cannot be cached.
>
> Thanks for any tips!
>
> Kind Regards,
> Wulf
>
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to