Hi Thiago,

I discovered a mailing-list post, from around 9 years ago, where you
advised someone to override the TapestryFilter.init(Registry registry)
method to save the registry to a static field.

Ideally, I'd like to invoke the static method of a standalone class to
access the registry and its hosted services, rather than employ the likes
of ApplicationGlobals or ObjectLocator, as per the custom Configurator
examples posted earlier.

My ServerEndpoint class is not stateless, as it contains the likes of
Multimaps of endpoints, necessary for broadcasting to multiple clients
etc.  So it's not just a matter of ensuring that injected services work,
but also that class (static) field values are shared across all instances
of the endpoint (configured in AppModule to be autobuilt with 'PERTHREAD'
scope).

My efforts are based on the assumption that the surest way of ensuring
that ALL instances of my ServerEndpoint class have working injected
services, and identical class (static) field values, is that these
endpoints all originate from the same IoC registry.

Tapestry services are easy.  ServerEndpoints are easy.  Marrying the two
is proving a little tricky.  :-)

Regards,

Chris.


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

Reply via email to