[
https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166215#comment-13166215
]
Denis Stepanov commented on TAP5-1765:
--------------------------------------
I'm overriding the MultipartDecoder:
@Scope(ScopeConstants.PERTHREAD)
public static MultipartDecoder
buildNewMultipartDecoder(PerthreadManager perthreadManager,
RegistryShutdownHub shutdownHub,
ObjectLocator locator) {
MultipartDecoderImpl multipartDecoder =
locator.autobuild(MultipartDecoderImpl.class);
perthreadManager.addThreadCleanupListener(multipartDecoder);
shutdownHub.addRegistryShutdownListener(new
RegistryShutdownListener() {
public void registryDidShutdown() {
FileCleaner.exitWhenFinished();
}
});
return multipartDecoder;
}
public static void contributeServiceOverride(MappedConfiguration<Class,
Object> configuration,
@Local MultipartDecoder multipartDecoder) {
configuration.add(MultipartDecoder.class, multipartDecoder);
}
> PerThread scope is not honored when service is created using autobuild
> ----------------------------------------------------------------------
>
> Key: TAP5-1765
> URL: https://issues.apache.org/jira/browse/TAP5-1765
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-ioc
> Affects Versions: 5.3
> Reporter: Denis Stepanov
> Assignee: Howard M. Lewis Ship
> Priority: Minor
> Fix For: 5.3.1, 5.4
>
>
> Bug is possible to reproduce by modifying IOC test class PerThreadModule:
> from:
> @Scope(ScopeConstants.PERTHREAD)
> public StringHolder buildStringHolder()
> {
> return new StringHolderImpl();
> }
> to:
> @Scope(ScopeConstants.PERTHREAD)
> public StringHolder buildStringHolder(@Autobuild StringHolderImpl impl)
> {
> return impl;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira