Re: service shutdown hook in tapestry-ioc

2010-04-21 Thread Christian Edward Gruber

Nope, but that's awesome, and exactly what we were looking for, i think.

Christian.

On Apr 21, 2010, at 4:08 PM, Shing Hing Man wrote:


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   
wrote:



From: Christian Edward Gruber 
Subject: service shutdown hook in tapestry-ioc
To: "Tapestry users" 
Cc: "Michael Taylor" 
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




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



Re: service shutdown hook in tapestry-ioc

2010-04-21 Thread Shing Hing Man
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  wrote:

> From: Christian Edward Gruber 
> Subject: service shutdown hook in tapestry-ioc
> To: "Tapestry users" 
> Cc: "Michael Taylor" 
> 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



service shutdown hook in tapestry-ioc

2010-04-21 Thread Christian Edward Gruber

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