Have you tried registering service with the RegistryShutdownHub ?
Below is an example.

    @ServiceId("connectionManager")
        public static SageConnectionManager 
buildSageConnectionManager(RegistryShutdownHub hub) {
                PooledSageConnectionManager connManager= new 
PooledSageConnectionManager();
        hub.addRegistryShutdownListener(connManager);
                return connManager;
        }

Note that PooledSageConnectionManager implements interface 
RegistryShutdownListener{
  public void registryDidShutdown()

}

When the register shuts down, the method registryDidShutdown will be called.

Shing


--- On Thu, 22/4/10, Christian Edward Gruber <cgru...@google.com> wrote:

> From: Christian Edward Gruber <cgru...@google.com>
> Subject: service shutdown hook in tapestry-ioc
> To: "Tapestry users" <users@tapestry.apache.org>
> Cc: "Michael Taylor" <miketay...@google.com>
> Date: Thursday, 22 April, 2010, 3:52
> Hi,
> 
>     We're building a service that connects to an
> RPC system for use in a t5 app (5.2-snap) but can't find
> anywhere to declare/identify shutdown logic.  Is there
> any sort of event the service impl can hook into either with
> an annotation or a module contribution somewhere to allow us
> to cleanly close up any state or resources in the service
> when the registry shuts down, or when it goes out of
> scope?  Noodling around the T5-ioc docs didn't bear any
> fruit, though clearly there was shutdown state transition in
> the registry itself.
> 
> Christian.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 




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

Reply via email to