hi there!

what's wrong with the following service?

AppModule.java

 public static void bind(ServiceBinder binder)
{
                                 
    binder.bind(DBService.class).scope("singleton");
}


DBService.java

public class DBService {

        private Session          session;

        public DBService(Session session) {
                this.session = session;
        }
        
        public Session getSession(){
                return this.session;
        }
        
..
}

                
Why does this lead to ?

Caused by: java.lang.IllegalStateException: Construction of service 'Alias' has 
failed due to recursion: the service depends on itself in some way. Please 
check org.apache.tapestry5.services.TapestryModule.build(Logger, String, 
AliasManager, Collection) (at TapestryModule.java:205) for references to 
another service that is itself dependent on service 'Alias'.
        at 
org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:52)
        at 
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:65)
        ... 56 more

DBService is supposed to be a service that aggregates all database query 
methods in one class....

Thanks!

Toby

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

Reply via email to