Index: JndiSessionRegistrarBase.java =================================================================== --- JndiSessionRegistrarBase.java (revision 104302) +++ JndiSessionRegistrarBase.java (working copy) @@ -684,15 +684,15 @@ String remoteBindingJndiName = remoteBinding.getJndiName(); if (remoteBindingJndiName != null && remoteBindingJndiName.trim().length() > 0) { - // 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); // also remove the remote proxy factory from jndi this.unbind(context, remoteBindingProxyFactoryKey); + + // Unbind the JNDI entry + this.unbind(context, remoteBindingJndiName); } } }