You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/03/05 15:24:38 UTC
[jira] [Commented] (TAP5-1954) ObjectLocator will return wrong
service implementation delegate when using markers alone
[ https://issues.apache.org/jira/browse/TAP5-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14348770#comment-14348770 ]
Jochen Kemnade commented on TAP5-1954:
--------------------------------------
Is this still an issue with more recent Tapestry versions (i.e. 5.3.8 or a recent 5.4 beta)?
> ObjectLocator will return wrong service implementation delegate when using markers alone
> ----------------------------------------------------------------------------------------
>
> Key: TAP5-1954
> URL: https://issues.apache.org/jira/browse/TAP5-1954
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-ioc
> Affects Versions: 5.3.3
> Reporter: Carsten Klein
>
> Having the following services bound using the specified markers
> binder.bind(IServiceOne.class, ServiceOneImpl.class).withMarker(ServiceOneMarker.class);
> binder.bind(IServiceOne.class, ServiceOneSecondImpl.class).withMarker(ServiceOneSecondMarker.class);
> will cause the ObjectLocator service to return the wrong implementation class when doing this
> objectLocator.getService(IServiceOne.class, ServiceOneSecondMarker.class);
> This will return an instance of ServiceOneImpl instead of ServiceOneSecondImpl, although the marker ServiceOneSecondMarker was never registered with the ServiceOneImpl class.
> As a workaround, one must use withId(...) when binding the service interface implementation classes. In that case, the object locator will return the correct implementation class.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)