container/services/src/main/java/org/mobicents/slee/container/management/ServiceManagementImpl.java
public void deactivateAndActivate(ServiceID arg0, ServiceID arg1)
			throws NullPointerException, InvalidArgumentException,
			UnrecognizedServiceException, InvalidStateException,
			ManagementException {
		if (logger.isInfoEnabled())
			logger.debug("deactivateAndActivate (" + arg0 + " , " + arg1);
		if (arg0 == arg1)
			throw new InvalidArgumentException(
					"Activating and deactivating the same service!");
		if ((arg0 == null) || (arg1 == null))
			throw new InvalidArgumentException("The service(s) are null!");
		try {
			ServiceComponent serviceToDeactivate = componentRepositoryImpl
					.getComponentByID(arg0);
			if (serviceToDeactivate == null) {
				throw new UnrecognizedServiceException();
			} else {
				activate(arg1,arg0);
				deactivate(arg0);
			}
		} catch (InvalidStateException ise) {
			throw ise;
		} catch (Exception ex) {
			throw new ManagementException(
					"exception in deactivating/activating service ! ");
		}
	}
public void deactivateAndActivate(ServiceID arg0, ServiceID arg1)
			throws NullPointerException, InvalidArgumentException,
			UnrecognizedServiceException, InvalidStateException,
			ManagementException {
		if (logger.isInfoEnabled())
			logger.debug("deactivateAndActivate (" + arg0 + " , " + arg1);
		if (arg0 == arg1)
			throw new InvalidArgumentException(
					"Activating and deactivating the same service!");
		if ((arg0 == null) || (arg1 == null))
			throw new InvalidArgumentException("The service(s) are null!");
		try {
			ServiceComponent serviceToDeactivate = componentRepositoryImpl
					.getComponentByID(arg0);
			if (serviceToDeactivate == null) {
				throw new UnrecognizedServiceException();
			} else {
				activate(arg1,arg0);
				deactivate(arg0);
			}
		} catch (InvalidStateException ise) {
			throw ise;
		} catch (Exception ex) {
			throw new ManagementException(
					"exception in deactivating/activating service ! ");
		}
	}
/*
(non-Javadoc)

@see
javax.slee.management.ServiceManagementMBean#deactivateAndActivate(javax
.slee.ServiceID, javax.slee.ServiceID)