You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org> on 2011/10/18 01:49:10 UTC

[jira] [Commented] (TAP5-1078) Refactor the management of ServiceProxyProvider

    [ https://issues.apache.org/jira/browse/TAP5-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13129345#comment-13129345 ] 

Howard M. Lewis Ship commented on TAP5-1078:
--------------------------------------------

What can be done about this?  What's really needed is a notification from the servlet container that objects are about to be de-serialized, so that we can store a per-thread object that links the serialized service tokens back to registry. Failing that, this bug may not be fixable.
                
> Refactor the management of ServiceProxyProvider
> -----------------------------------------------
>
>                 Key: TAP5-1078
>                 URL: https://issues.apache.org/jira/browse/TAP5-1078
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-ioc
>    Affects Versions: 5.1.0.5
>            Reporter: Igor Drobiazko
>            Priority: Critical
>
> Currently the ServiceProxyProvider/Registry is stored in a static field of SerializationSupport and retrieved via static methods. This approach works fine if Tapestry IoC JAR is located in WEB-INF/lib of an application. Unfortunately this approach is not compatible with OSGi where Tapestry IoC bundle is shared by several bundles, each creating its own Registry. The registry does a SerializationSupport #setProvider() at startup. Starting several Registries inside a JVM it is not possible to make sure that the Registry reference in SerializationSupport  is always the same.
> I realized the problem starting two OSGi bundles, each starting its own Registry. When one of these bundles is stopped, its Registry is shut down. In this case we see the following log message:
> 25.03.2010 10:47:04,680 # ERROR # org.apache.tapestry5.ioc.internal.SerializationSupport # [SerializationSupport.setProvider] # Setting a new service proxy provider when there's already an existing provider. This may indicate that you have multiple IoC Registries.
> We should refactor the management of ServiceProxyProvider. I think it is sufficient to move the logic of SerializationSupport into InternalRegistry.

--
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