On Tue, 29 Nov 2011 18:04:33 -0200, robert baker <les.baker1...@gmail.com>
wrote:
Hi all,
Hi!
public static SessionTracker buildSessionTracker(
@Autobuild SessionTrackerImpl sessionTrackerImpl,
UserEventHub eventHub) {
eventHub.addUserEventListener(sessionTrackerImpl);
return sessionTrackerImpl;
}
public static void bind(ServiceBinder binder)
{
binder.bind(SessionTracker.class, SessionTrackerImpl.class);
binder.bind(UserEventHub.class, UserEventHubImpl.class);
}
You shouldn't use @Autobuild for objects which are already configured as
services, as @Autobuild will always instantiate a new instance. Without
this annotation, this parameter will get the SessionTracker object from
the Registry (i.e. the service registered in Tapestry-IoC).
Try
public static SessionTracker buildSessionTracker(SessionTracker
sessionTracker,UserEventHub eventHub) (without @Autobuild)
--
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