[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-1946) Undeploy Issue with Clustered Stateless Session Beans with HTTP(S) Remote Bindings
Joel Konieczny (JIRA)
jira-events at lists.jboss.org
Wed Apr 28 14:47:10 EDT 2010
[ https://jira.jboss.org/jira/browse/EJBTHREE-1946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12528020#action_12528020 ]
Joel Konieczny commented on EJBTHREE-1946:
------------------------------------------
Finally got some time to look into this. Put some extra logging into things and the problem seems to be the proxyfactory deregistration.
Here's the relevant log trace:
13:14:04,027 DEBUG [JndiSessionRegistrarBase] (N/A) Unbinding Reference: TestBean/remotehttp
13:14:04,027 DEBUG [ProxyClusteringRegistry] (N/A) Replacing ClusterConfigMetaData partitionName property ${jboss.partition.name:DefaultPartition} with CMPPartition
13:14:04,027 DEBUG [JndiSessionRegistrarBase] (N/A) Deregistering ProxyFactory under name "ProxyFactory/test_ear-1.0/TestBean/TestBean/remotehttp/CMPPartition"
13:14:04,027 DEBUG [JndiSessionRegistrarBase] (N/A) Bound javax.naming.Reference into JNDI at "TestBean/remotehttp"
The naming reference is removed and then rebound during the proxy factory deregistration. The stack trace during the rebind is:
org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.rebind(JndiSessionRegistrarBase.java:961)
org.jboss.ejb3.proxy.clustered.jndiregistrar.JndiClusteredSessionRegistrarBase.clusterTopologyChanged(JndiClusteredSessionRegistrarBase.java:133)
org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry.replicantsChanged(ProxyClusteringRegistry.java:241)
org.jboss.ha.framework.server.DistributedReplicantManagerImpl.notifyKeyListeners(DistributedReplicantManagerImpl.java:882)
org.jboss.ha.framework.server.DistributedReplicantManagerImpl.removeLocal(DistributedReplicantManagerImpl.java:470)
org.jboss.ha.framework.server.DistributedReplicantManagerImpl.remove(DistributedReplicantManagerImpl.java:452)
org.jboss.ha.framework.server.HATarget.cleanExistenceInCurrentHAPartition(HATarget.java:321)
org.jboss.ha.framework.server.HATarget.destroy(HATarget.java:135)
org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry.unregisterClusteredBean(ProxyClusteringRegistry.java:157)
org.jboss.ejb3.proxy.clustered.factory.session.stateless.StatelessSessionClusteredProxyFactory.stop(StatelessSessionClusteredProxyFactory.java:127)
<Bunch of Microcontainer calls elided>
org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:568)
org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.unbind(Ejb3McRegistrar.java:319)
org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.deregisterProxyFactory(JndiSessionRegistrarBase.java:1312)
org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.unbindEjb(JndiSessionRegistrarBase.java:695)
Basically a cluster topography changed event is being thrown during the proxy deregistration that causes the naming reference to be rebound. I'm not familiar enough with the expected process here to know if the event shouldn't have been thrown, or the event processing shouldn't be re-registering the reference. However, the easy fix was simply to reverse the unbind order.
Swap these lines from unbindEjb in JndiSessionRegistrarBase from this
// Unbind the JNDI entry
this.unbind(context, remoteBindingJndiName);
// Find and deregister the remote proxy factory
String remoteBindingProxyFactoryKey = this.getProxyFactoryRegistryKey(remoteBindingJndiName, smd,
false);
this.deregisterProxyFactory(remoteBindingProxyFactoryKey);
to
// Find and deregister the remote proxy factory
String remoteBindingProxyFactoryKey = this.getProxyFactoryRegistryKey(remoteBindingJndiName, smd,
false);
this.deregisterProxyFactory(remoteBindingProxyFactoryKey);
// Unbind the JNDI entry
this.unbind(context, remoteBindingJndiName);
Thus we unbind the entry regardless of what the proxy factory deregistration does. We're testing this and it seems to work without any issues, but I have no idea if this is the correct approach. Feedback?
> Undeploy Issue with Clustered Stateless Session Beans with HTTP(S) Remote Bindings
> ----------------------------------------------------------------------------------
>
> Key: EJBTHREE-1946
> URL: https://jira.jboss.org/jira/browse/EJBTHREE-1946
> Project: EJB 3.0
> Issue Type: Bug
> Components: proxy-clustered
> Affects Versions: 1.1.5
> Environment: AS 5.1.0 GA
> Reporter: Joel Konieczny
> Assignee: Andrew Lee Rubinger
> Attachments: test.rar
>
>
> Combination of a clustered annotation and a HTTP(S) based remote proxy on a stateless session bean causes the bean to leave the HTTP(S) remote proxy binding still deployed after an undeploy operation, breaking re-deploys of the bean.
> For example:
> <session>
> <ejb-name>TestBean</ejb-name>
> <remote-binding>
> <jndi-name>TestBean/remote</jndi-name>
> </remote-binding>
> <remote-binding>
> <jndi-name>TestBean/remotehttp</jndi-name>
> <client-bind-url>
> http://${public.firewall.address}/servlet-invoker/ServerInvokerServlet
> </client-bind-url>
> </remote-binding>
> <clustered>true</clustered>
> </session>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list