Can you expantiate on this solution with examples? I'm accessing services in a hivemodule.xml in the tapestry-bayeux jar and my code is having trouble locating the service!
RonPiterman wrote: > > Now I think both yours and mine ideas are problematic because they don't > work in a changing services enviourenment. > If one adds a new MyService service in a jar, say tacos, you have to > rewrite all your @InjectObject annotations. wow. > The same if one adds a new Service defined for a certain interface. > > Now what we do, which saves *much* trouble with service names is define > a single interface for each of our "injectable" services, and add an > "implemenets InjMyService" to the class definition. > Thus the service name is defined twice in the whole system: > 1. in the hivemodule.xml > 2. in the InjMyService. > > Saves many problems... > > Cheers, > Ron > > > > Martin Strand wrote: >> Just a thought, wouldn't it be nice if InjectObject by default injected >> the service with an id equal to the return type's fully qualified name? >> >> >> @InjectObject >> public abstract MyService getMyService(); >> >> would be the same as >> >> @InjectObject("service:my.package.MyService") >> public abstract MyService getMyService(); >> >> >> At least for me the type's name is equal to the service id about 99% of >> the time. What do you think?. >> >> --Martin >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/InjectObject-tp2300409p14460838.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]