2728293031323334353637
ServiceReference sRef = bc.getServiceReference(UserService.class.getName()); if (sRef != null) { UserService us = (UserService) bc.getService(sRef); if (us != null) { us.logout(); } bc.ungetService(sRef); } }