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 (arg0.length == 0 || arg1.length == 0)
			throw new InvalidArgumentException("The parameter array(s) must not be empty.");
		
		if (arg0.length != arg1.length)
			throw new InvalidArgumentException("The parameter arrays must have same lenght.");
		
		Set<ServiceID> services = new HashSet<ServiceID>();
		
		for (int i = 0; i < arg0.length - 1; i++) {
			if (arg0[i] == null || arg1[i] == null) {
				throw new InvalidArgumentException("Null entry found in parameter array(s).");
			}
			if (!services.add(arg0[i]) || !services.add(arg1[i])) {
				throw new InvalidArgumentException("Repeated entry found in parameter array(s).");
			}
		}
		
		try {
			for (int i = 0; i < arg0.length; i++) {
				deactivateAndActivate(arg0[i],arg1[i]);
			}			
		} catch (InvalidStateException ise) {
			throw ise;
		} catch (ManagementException me) {
			throw me;
		}
	}
public void deactivateAndActivate(ServiceID[] arg0, ServiceID[] arg1)
			throws NullPointerException, InvalidArgumentException,
			UnrecognizedServiceException, InvalidStateException,
			ManagementException {

		if (arg0.length == 0 || arg1.length == 0)
			throw new InvalidArgumentException("The parameter array(s) must not be empty.");
		
		if (arg0.length != arg1.length)
			throw new InvalidArgumentException("The parameter arrays must have same lenght.");
		
		Set<ServiceID> services = new HashSet<ServiceID>();
		
		for (int i = 0; i < arg0.length - 1; i++) {
			if (arg0[i] == null || arg1[i] == null) {
				throw new InvalidArgumentException("Null entry found in parameter array(s).");
			}
			if (!services.add(arg0[i]) || !services.add(arg1[i])) {
				throw new InvalidArgumentException("Repeated entry found in parameter array(s).");
			}
		}
		
		try {
			for (int i = 0; i < arg0.length; i++) {
				deactivateAndActivate(arg0[i],arg1[i]);
			}			
		} catch (InvalidStateException ise) {
			throw ise;
		} catch (ManagementException me) {
			throw me;
		}
	}
public void deactivateAndActivate ( ServiceID [ ] arg0 , ServiceID [ ] arg1 ) throws NullPointerException , InvalidArgumentException , UnrecognizedServiceException , InvalidStateException , ManagementException { if ( arg0 . length == 0 || arg1 . length == 0 ) throw new InvalidArgumentException ( "The parameter array(s) must not be empty." ) ; if ( arg0 . length != arg1 . length ) throw new InvalidArgumentException ( "The parameter arrays must have same lenght." ) ; Set < ServiceID > services = new HashSet < ServiceID > ( ) ; for ( int i = 0 ; i < arg0 . length - 1 ; i ++ ) { if ( arg0 [ i ] == null || arg1 [ i ] == null ) { throw new InvalidArgumentException ( "Null entry found in parameter array(s)." ) ; } if ( ! services . add ( arg0 [ i ] ) || ! services . add ( arg1 [ i ] ) ) { throw new InvalidArgumentException ( "Repeated entry found in parameter array(s)." ) ; } } try { for ( int i = 0 ; i < arg0 . length ; i ++ ) { deactivateAndActivate ( arg0 [ i ] , arg1 [ i ] ) ; } } catch ( InvalidStateException ise ) { throw ise ; } catch ( ManagementException me ) { throw me ; } }
/*
(non-Javadoc)

@see
javax.slee.management.ServiceManagementMBean#deactivateAndActivate(javax
.slee.ServiceID[], javax.slee.ServiceID[])
/ * ( non - Javadoc )