container/activities/src/main/java/org/mobicents/slee/runtime/facilities/nullactivity/NullActivityFactoryImpl.java
public NullActivityImpl createNullActivity(
			NullActivityHandle nullActivityHandle, boolean mandateTransaction)
			throws TransactionRequiredLocalException, FactoryException {
		// check mandated by SLEE TCK test CreateActivityWhileStoppingTest
		if (sleeContainer.getSleeState() != SleeState.RUNNING) {
			return null;
		}

		if (mandateTransaction) {
			sleeContainer.getTransactionManager().mandateTransaction();
		}

		// create activity
		NullActivityImpl nullActivity = new NullActivityImpl(nullActivityHandle);
		// get an activity context for it
		try {
			sleeContainer.getActivityContextFactory().createActivityContext(
					new NullActivityContextHandle(nullActivityHandle),
					ActivityFlags.REQUEST_ACTIVITY_UNREFERENCED_CALLBACK);
		} catch (ActivityAlreadyExistsException e) {
			throw new FactoryException(e.getMessage(), e);
		}

		if (logger.isDebugEnabled()) {
			logger
					.debug("NullActivityFactory.createNullActivity() Created null activity "
							+ nullActivity);
		}

		return nullActivity;
	}
public NullActivityImpl createNullActivity(
			NullActivityHandle nullActivityHandle, boolean mandateTransaction)
			throws TransactionRequiredLocalException, FactoryException {
		// check mandated by SLEE TCK test CreateActivityWhileStoppingTest
		if (sleeContainer.getSleeState() != SleeState.RUNNING) {
			return null;
		}

		if (mandateTransaction) {
			sleeContainer.getTransactionManager().mandateTransaction();
		}

		// create activity
		NullActivityImpl nullActivity = new NullActivityImpl(nullActivityHandle);
		// get an activity context for it
		try {
			sleeContainer.getActivityContextFactory().createActivityContext(
					new NullActivityContextHandle(nullActivityHandle),
					ActivityFlags.REQUEST_ACTIVITY_UNREFERENCED_CALLBACK);
		} catch (ActivityAlreadyExistsException e) {
			throw new FactoryException(e.getMessage(), e);
		}

		if (logger.isDebugEnabled()) {
			logger
					.debug("NullActivityFactory.createNullActivity() Created null activity "
							+ nullActivity);
		}

		return nullActivity;
	}
public NullActivityImpl createNullActivity ( NullActivityHandle nullActivityHandle , boolean mandateTransaction ) throws TransactionRequiredLocalException , FactoryException { // check mandated by SLEE TCK test CreateActivityWhileStoppingTest
 if ( sleeContainer . getSleeState ( ) != SleeState . RUNNING ) { return null ; } if ( mandateTransaction ) { sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; } // create activity
 NullActivityImpl nullActivity = new NullActivityImpl ( nullActivityHandle ) ; // get an activity context for it
 try { sleeContainer . getActivityContextFactory ( ) . createActivityContext ( new NullActivityContextHandle ( nullActivityHandle ) , ActivityFlags . REQUEST_ACTIVITY_UNREFERENCED_CALLBACK ) ; } catch ( ActivityAlreadyExistsException e ) { throw new FactoryException ( e . getMessage ( ) , e ) ; } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "NullActivityFactory.createNullActivity() Created null activity " + nullActivity ) ; } return nullActivity ; }
/*
(non-Javadoc)

@see
org.mobicents.slee.runtime.facilities.nullactivity.NullActivityFactory
#createNullActivityImpl
(org.mobicents.slee.runtime.facilities.nullactivity.NullActivityHandle,
boolean)
/ * ( non - Javadoc )