“Unable to Locate Activated Endpoint” when reusing a common service

We have one EJB for sending email notifications. We did not use Email BC because we have to format the email and we did not want to do that in every BPEL. We have atleast 30 service assemblies using this EJB. Everytime we shutdown one of the service assemblies, this EJB stops working. We will not get email notifications. When we went through the logs we found that we are getting “Unable to locate activated endpoint” error. Usually this error occurs when the service is not deployed or not reachable. On Further investigation we were able to make out that when we shutdown any of the service assemblies which uses this EJB it affects all the others. We thought it is a bug with GlassFishESB. As a workaround, we had to restart all the service assemblies which uses this EJB. I wanted to fix this Bug. I wrote two service assemblies TestCA1 and TestCA2, and one CommonEJB. TestCA1 and TestCA2 will receive a http request, invoke the CommonEJB and return the string from CommonEJB. This is a plain echo service. For invoking this EJB from BPEL I need to have the WSDL of this EJB. So I used “Generate and Copy WSDL..” option to copy the WSDL into the BPEL folder. I was able to cleanly reproduce the problem. Everytime I shutdown TestBP1, TestBP2 was not working and vice versa. I turned the JBI logging to finest. And this is what I found when I shutdown TestCA1: [#|2012-02-14T19:33:41.322+0530|FINE|sun-appserver2.1|com.sun.jbi.messaging|_ThreadID=1015;_ThreadName=TestCA1-sun-http-binding;ClassName=com.sun.jbi.messaging.EndpointRegistry;MethodName=removeEndpoint;_RequestID=42f05924-ebc6-43ad-8a4d-539c8d910bf3;|Removed endpoint: http://test.logicoy.com/,CommonEJBService,CommonEJBPort|#] So it is clear that it is removing this endpoint from EndpointRegistry. But why does it remove this endpoint?...