I think the best approach would be to define this code that needs the
Registry as Tapestry-IoC services, so service injection would be
automatic. Don't forget that Tapestry-IoC is completely independent from
Tapestry-the-web-framework (tapestry-core). This would work for web or
non-web projects. In completely non-web projects, you would need to create
the Registry yourself:
http://tapestry.apache.org/tapestry5.1/tapestry-ioc/run.html. If you
really need to get services in runtime, inject the ObjectLocator service.
Taking a look at the TapestryFilter source, a desperate solution is to
subclass it. In this subclass, you would have a static field pointing to
the Registry instance. I would override the TapestryFilter.init(Registry
registry) so it would set the static field.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org