I'm developing background services for windows and linux using java with tapestry IoC. This requires having a static method to be called and I use this snippet to start my tapestry app:
System.out.println("Starting service."); > RegistryBuilder builder = null; > try { > builder = new RegistryBuilder(); > System.out.println("Adding module as builder to tapestry registry."); > builder.add(TestAgentModule.class); > // builder.add(CoreModule.class); > // builder.add(TestAgentCoreModule.class); > System.out.println("Building tapestry registry."); > registry = builder.build(); > System.out.println("Starting tapestry registry."); > registry.performRegistryStartup(); > System.out.println("Tapestry registry started."); > } catch (Throwable t) { > System.out.println(t.getMessage()); > t.printStackTrace(); > } In this environment, If I start my application with the highlighted statements commented as they are, the commented modules wont start although they are in the classpath. I get the desired behavior with web applications but not with this environment ! But If I un-comment these lines, the modules get injected as expected. What did I miss here ? Assuming tapestry doesn't support auto-loading when started in that way, can I stop having to add the manifest attribute " Tapestry-Module-Classes" since it would be useless then ?