I hit a recursion error that I resolved by moving all my initialization code in my Spring bean into a method that only gets invoked on first use ( if (!initialized) init() ).
I had recursion problems when the code was in the constructor, and when it was in an init() method automatically run by Spring post-injection. On Tue, Feb 15, 2011 at 8:58 AM, LLTYK <ll...@mailinator.com> wrote: > > I'm trying to use a spring bean in my AppModule: > > public static void > contributeApplicationDefaults(MappedConfiguration<String, String> > configuration, > @Inject SomeSpringBean someSpringBean) > { > configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en"); > configuration.add(SymbolConstants.APPLICATION_VERSION, > someSpringBean.getVersion())); > } > > > It fails with this exception: > 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.buildAlias(Logger, String, > AliasManager, Collection) (at TapestryModule.java:411) for references to > another service that is itself dependent on service 'Alias'. > > > Any ideas on how to do this? > -- > View this message in context: > http://tapestry-users.832.n2.nabble.com/Spring-beans-in-the-AppModule-tp6027304p6027304.html > Sent from the Tapestry Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Jonathan Barker