You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Denis Stepanov (Created) (JIRA)" <ji...@apache.org> on 2011/12/01 12:01:40 UTC
[jira] [Created] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
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
Priority: Critical
Bug is possible to reproduce by modifying IOC test class PerThreadModule:
from:
{code:java}
@Scope(ScopeConstants.PERTHREAD)
public StringHolder buildStringHolder()
{
return new StringHolderImpl();
}
{code}
to:
{code:java}
@Scope(ScopeConstants.PERTHREAD)
public StringHolder buildStringHolder(@Autobuild StringHolderImpl impl)
{
return impl;
}
{code}
--
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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Denis Stepanov (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161019#comment-13161019 ]
Denis Stepanov commented on TAP5-1765:
--------------------------------------
I'm more concerned about Upload's MultipartDecoder being broken because of that, I have fixed it in my code but everyone else could encounter critical problems.
> 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
> Priority: Minor
>
> 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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Denis Stepanov (Commented) (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Updated] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Howard M. Lewis Ship (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAP5-1765:
---------------------------------------
Priority: Minor (was: Critical)
The workaround is to inject the ObjectLocator and invoke autobuild() on it within your build method. I'm adding code to special case @Autobuild to be a new instance on each method invocation.
> 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
> Priority: Minor
>
> 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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160989#comment-13160989 ]
Howard M. Lewis Ship commented on TAP5-1765:
--------------------------------------------
I was about to dismiss this out of hand, but I realized some optimizations in 5.3 could account for this; it may be that @Autobuild StringHolderImpl is created just once, and then passed to buildStringHolder() each time it is invoked from the per thread service lifecycle.
> 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
> Priority: Critical
>
> 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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Denis Stepanov (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161019#comment-13161019 ]
Denis Stepanov commented on TAP5-1765:
--------------------------------------
I'm more concerned about Upload's MultipartDecoder being broken because of that, I have fixed it in my code but everyone else could encounter critical problems.
> 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
> Priority: Minor
>
> 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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Michael Wyraz (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166214#comment-13166214 ]
Michael Wyraz commented on TAP5-1765:
-------------------------------------
In our productive appplications after a while of running, on every event-request an error about multipart decoding occurs. I revired the code and I'm very sure it's relatet to it. This breaks running appplications in a almost non reproducible way. So I'd consider this bug as bein critical. If possible please try to do a bugfix release.
@Denis how could you fix it in your code?
> 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
[jira] [Closed] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Howard M. Lewis Ship (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1765.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.4
5.3.1
Assignee: Howard M. Lewis Ship
> 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
[jira] [Updated] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Denis Stepanov (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Stepanov updated TAP5-1765:
---------------------------------
Description:
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;
}
was:
Bug is possible to reproduce by modifying IOC test class PerThreadModule:
from:
{code:java}
@Scope(ScopeConstants.PERTHREAD)
public StringHolder buildStringHolder()
{
return new StringHolderImpl();
}
{code}
to:
{code:java}
@Scope(ScopeConstants.PERTHREAD)
public StringHolder buildStringHolder(@Autobuild StringHolderImpl impl)
{
return impl;
}
{code}
> 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
> Priority: Critical
>
> 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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161084#comment-13161084 ]
Hudson commented on TAP5-1765:
------------------------------
Integrated in tapestry-trunk-freestyle #633 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/633/])
TAP5-1765: PerThread scope is not honored when service is created using autobuild
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1209175
Files :
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ContributionDefImpl.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ModuleImpl.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ConstructorInvoker.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/MethodInvoker.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/PerThreadModule.java
> 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
[jira] [Updated] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Howard M. Lewis Ship (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAP5-1765:
---------------------------------------
Priority: Minor (was: Critical)
The workaround is to inject the ObjectLocator and invoke autobuild() on it within your build method. I'm adding code to special case @Autobuild to be a new instance on each method invocation.
> 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
> Priority: Minor
>
> 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
[jira] [Closed] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Howard M. Lewis Ship (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1765.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.4
5.3.1
Assignee: Howard M. Lewis Ship
> 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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160989#comment-13160989 ]
Howard M. Lewis Ship commented on TAP5-1765:
--------------------------------------------
I was about to dismiss this out of hand, but I realized some optimizations in 5.3 could account for this; it may be that @Autobuild StringHolderImpl is created just once, and then passed to buildStringHolder() each time it is invoked from the per thread service lifecycle.
> 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
> Priority: Critical
>
> 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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161084#comment-13161084 ]
Hudson commented on TAP5-1765:
------------------------------
Integrated in tapestry-trunk-freestyle #633 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/633/])
TAP5-1765: PerThread scope is not honored when service is created using autobuild
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1209175
Files :
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ContributionDefImpl.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ModuleImpl.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ConstructorInvoker.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/MethodInvoker.java
* /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/PerThreadModule.java
> 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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Denis Stepanov (Commented) (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Updated] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Denis Stepanov (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Stepanov updated TAP5-1765:
---------------------------------
Description:
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;
}
was:
Bug is possible to reproduce by modifying IOC test class PerThreadModule:
from:
{code:java}
@Scope(ScopeConstants.PERTHREAD)
public StringHolder buildStringHolder()
{
return new StringHolderImpl();
}
{code}
to:
{code:java}
@Scope(ScopeConstants.PERTHREAD)
public StringHolder buildStringHolder(@Autobuild StringHolderImpl impl)
{
return impl;
}
{code}
> 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
> Priority: Critical
>
> 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
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when
service is created using autobuild
Posted by "Michael Wyraz (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166214#comment-13166214 ]
Michael Wyraz commented on TAP5-1765:
-------------------------------------
In our productive appplications after a while of running, on every event-request an error about multipart decoding occurs. I revired the code and I'm very sure it's relatet to it. This breaks running appplications in a almost non reproducible way. So I'd consider this bug as bein critical. If possible please try to do a bugfix release.
@Denis how could you fix it in your code?
> 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