pass in a factory service to your ChatCoordinator that will return a new instance on every invocation (eg. create(....))
g kris Foror <[EMAIL PROTECTED]> 09.04.2008 06:08 Bitte antworten an "Tapestry users" <users@tapestry.apache.org> An Tapestry users <users@tapestry.apache.org> Kopie Thema get perthread_scope service from singleton_scope service // singleton public IChatCoordinator buildChatCoordinator() {...} @Scope(IOCConstants.PERTHREAD_SCOPE) public IPerthredService buildPerthreadService(@Inject IOtherPerthredService) {...} --- // singleton public class ChatCoordinator implements IChatCoordinator { // for every call this method needed new IPerthredService public void someMethod() { IPerthredService service = ? // who build new IPerthredService? } } public class ChatJobSchedule extends TimerTask { private IChatCoordinator op; public ChatJobSchedule(IChatCoordinator op) { this.op = op; } @Override public void run() { op.someMethod(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]