opensubscriber
   Find in this group all groups
 
Unknown more information…

u : users@tapestry.apache.org 22 December 2007 • 3:23AM -0500

Re: InjectObject
by bioye

REPLY TO AUTHOR
 
REPLY TO GROUP





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: tapestry-user-unsubscribe@jaka...
>> For additional commands, e-mail: tapestry-user-help@jaka...
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jaka...
> For additional commands, e-mail: tapestry-user-help@jaka...
>
>
>

--
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: users-unsubscribe@tape...
For additional commands, e-mail: users-help@tape...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.