RE: Override service injection

2008-05-19 Thread Kristian Marinkovic
have you tried contributing an alias for your named service?

take a look at 
http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html

g,
kris




Robin Helgelin [EMAIL PROTECTED] 
19.05.2008 10:09
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
Tapestry users users@tapestry.apache.org
Kopie

Thema
Override service injection







Hi,

I'm still trying to work around something I'm not really sure on how
to solve :)

My contribution looks like this:
public static void contributeHttpServletRequestHandler(
  OrderedConfigurationHttpServletRequestFilter configuration,
  @InjectService(HttpSessionContextIntegrationFilter)
HttpServletRequestFilter httpSessionContextIntegrationFilter,
  @InjectService(AuthenticationProcessingFilter)
HttpServletRequestFilter authenticationProcessingFilter,
[snip...]
) {

configuration.add(acegiHttpSessionContextIntegrationFilter,
httpSessionContextIntegrationFilter, before:acegi*);
configuration.add(acegiAuthenticationProcessingFilter,
authenticationProcessingFilter);
[snip...]
}

As currently it's not possible to override on the OrderedContribution
itself, I was thinking on how to solve it at the injected part
instead. As there are several services implementing
HttpServletRequestFilter I must inject via name, but how can I
override that? Inject a string value with the name of the service and
look up the service without using method properties injection?

-- 
 regards,
 Robin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Override service injection

2008-05-19 Thread Robin Helgelin
On Mon, May 19, 2008 at 10:20 AM, Kristian Marinkovic
[EMAIL PROTECTED] wrote:
 have you tried contributing an alias for your named service?

 take a look at
 http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html

Yes, but wouldn't that break as several services implements the same interface?

-- 
 regards,
 Robin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Override service injection

2008-05-19 Thread Robin Helgelin
On Mon, May 19, 2008 at 10:20 AM, Kristian Marinkovic
[EMAIL PROTECTED] wrote:
 have you tried contributing an alias for your named service?

 take a look at
 http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html

Actually I manage to solve this via aliases by splitting my service
into several small services.

-- 
 regards,
 Robin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]