ActivityContextInterface aci) {
try {
Context myEnv = (Context) new InitialContext()
.lookup("java:comp/env");
// check if it's my service aci that is ending
ServiceActivity sa = ((ServiceActivityFactory) myEnv
.lookup("slee/serviceactivity/factory")).getActivity();
if (sa.equals(aci.getActivity())) {
xmppSbbInterface.disconnect(connectionID);
}
} catch (Exception e) {
e.printStackTrace();
}