It makes sense to have "private" services, would be nice to have services which will be only exposed to the services in the current module.
Denis Mar 28, 2012 v 12:43 PM, Lance Java: > I have never done this myself but see here for instantiating a Tapestry IOC > registry yourself > http://wiki.apache.org/tapestry/Tapestry5HowToIocOnly > > If you want the private registry to inherit the public registry I think > that you will need to use RegistryBuilder.add(ModuleDef) > > http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/ioc/RegistryBuilder.html#add%28org.apache.tapestry5.ioc.def.ModuleDef%29 > > I am surprised that Tapestry does not eat it's own dogfood, I would have > thought that Registry would have implemented ModuleDef or that there was at > least an adapter available. > > http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/ioc/def/ModuleDef.html > > You may need to write a RegistryModuleDef which does a job to the > SpringModuleDef > http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/internal/spring/SpringModuleDef.html > > On Wednesday, 28 March 2012, fmaylinch <ferranmayli...@gmail.com> wrote: >> >> Lance Java wrote >>> >>> Perhaps a solution is to setup a second, private Tapestry IOC registry > for >>> defining your private services. Your public service then looks up the >>> private service from the private registry instead of from the public >>> registry. >>> >> >> Interesting solution... any help on how to do that will be appreciated. >> >> Anyway, I think that this solution means there would be many private >> services together, and they will be available to services they don't > belong >> to. For example, if A1 needs A2 and B1 needs B2, your solution is to put > A1 >> and B1 in the "public" default registry and A2 and B2 in another "private" >> registry. But that way A1 could access B2 when that is not our intention. >> >> But thank you! Maybe we could use that idea somehow. As I said, can you >> explain me how to do that or give me some ideas? >> >> >> -- >> View this message in context: > http://tapestry.1045711.n5.nabble.com/How-to-define-a-private-service-a-service-only-for-another-service-tp5597443p5600049.html >> Sent from the Tapestry - User 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 >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org