I would have written it as:

public DataService buildDataService(RegistryShutdownHub hub)
{
  DataServiceImpl service = new DataServiceImpl();

  hub.addRegistryShutdownListener(service);

  return service;
}

I don't like unnecessary casts.

On Wed, Jun 18, 2008 at 7:07 PM, eduardo cavalcanti
<[EMAIL PROTECTED]> wrote:
>
> Thanks a lot, Kristian,
> That's it.
>
> Just for the record, the final form of the service registration method, on
> AppModule:
>
> public DataService buildDataService(RegistryShutdownHub hub) {
>
>        DataService ds = new DataServiceImpl();
>
>        hub.addRegistryShutdownListener((RegistryShutdownListener) ds);
>
>        return ds;
>        }
> --
> View this message in context: 
> http://www.nabble.com/configuring-a-service-for-shutdown-notification-tp17959487p17995884.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to