container/profiles/src/main/java/org/mobicents/slee/container/profile/ProfileCallRecorderTransactionData.java
@SuppressWarnings("unchecked")
	public static void addProfileCall(ProfileObjectImpl po) throws SLEEException
	{
    SleeTransactionManager sleeTransactionManager = sleeContainer.getTransactionManager();
    
    try {
      if(sleeTransactionManager.getTransaction() == null) {
        return;
      }
    }
    catch ( SystemException se ) {
      throw new SLEEException("Unable to verify SLEE Transaction.", se);
    }
    
	  String key = makeKey(po);
	  
		if (logger.isTraceEnabled()) {
			logger.trace("Recording call to profile. Key[" + key + "]");
		}
		
		final TransactionContext txContext = sleeTransactionManager.getTransactionContext();
		ProfileCallRecorderTransactionData data = (ProfileCallRecorderTransactionData) txContext.getData().get(TRANSACTION_CONTEXT_KEY);

		// If data does not exist, create it
		if (data == null) {
			data = new ProfileCallRecorderTransactionData();
			txContext.getData().put(TRANSACTION_CONTEXT_KEY, data);
		}

		if (!po.isProfileReentrant())
		{
			// we need to check
			if (data.invokedProfiles.contains(key) && data.invokedProfiles.getLast().compareTo(key) != 0) {
				throw new SLEEException("Detected loopback call. Call sequence: " + data.invokedProfiles);
			}
			data.invokedProfiles.add(key);
			data.invokedProfileTablesNames.add(po.getProfileTable().getProfileTableName());
		}

	}
@SuppressWarnings("unchecked")
	public static void addProfileCall(ProfileObjectImpl po) throws SLEEException
	{
    SleeTransactionManager sleeTransactionManager = sleeContainer.getTransactionManager();
    
    try {
      if(sleeTransactionManager.getTransaction() == null) {
        return;
      }
    }
    catch ( SystemException se ) {
      throw new SLEEException("Unable to verify SLEE Transaction.", se);
    }
    
	  String key = makeKey(po);
	  
		if (logger.isTraceEnabled()) {
			logger.trace("Recording call to profile. Key[" + key + "]");
		}
		
		final TransactionContext txContext = sleeTransactionManager.getTransactionContext();
		ProfileCallRecorderTransactionData data = (ProfileCallRecorderTransactionData) txContext.getData().get(TRANSACTION_CONTEXT_KEY);

		// If data does not exist, create it
		if (data == null) {
			data = new ProfileCallRecorderTransactionData();
			txContext.getData().put(TRANSACTION_CONTEXT_KEY, data);
		}

		if (!po.isProfileReentrant())
		{
			// we need to check
			if (data.invokedProfiles.contains(key) && data.invokedProfiles.getLast().compareTo(key) != 0) {
				throw new SLEEException("Detected loopback call. Call sequence: " + data.invokedProfiles);
			}
			data.invokedProfiles.add(key);
			data.invokedProfileTablesNames.add(po.getProfileTable().getProfileTableName());
		}

	}
@ SuppressWarnings ( "unchecked" ) public static void addProfileCall ( ProfileObjectImpl po ) throws SLEEException { SleeTransactionManager sleeTransactionManager = sleeContainer . getTransactionManager ( ) ; try { if ( sleeTransactionManager . getTransaction ( ) == null ) { return ; } } catch ( SystemException se ) { throw new SLEEException ( "Unable to verify SLEE Transaction." , se ) ; } String key = makeKey ( po ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Recording call to profile. Key[" + key + "]" ) ; } final TransactionContext txContext = sleeTransactionManager . getTransactionContext ( ) ; ProfileCallRecorderTransactionData data = ( ProfileCallRecorderTransactionData ) txContext . getData ( ) . get ( TRANSACTION_CONTEXT_KEY ) ; // If data does not exist, create it
 if ( data == null ) { data = new ProfileCallRecorderTransactionData ( ) ; txContext . getData ( ) . put ( TRANSACTION_CONTEXT_KEY , data ) ; } if ( ! po . isProfileReentrant ( ) ) { // we need to check
 if ( data . invokedProfiles . contains ( key ) && data . invokedProfiles . getLast ( ) . compareTo ( key ) != 0 ) { throw new SLEEException ( "Detected loopback call. Call sequence: " + data . invokedProfiles ) ; } data . invokedProfiles . add ( key ) ; data . invokedProfileTablesNames . add ( po . getProfileTable ( ) . getProfileTableName ( ) ) ; } }
Adds call to this profile.

@param po
@throws SLEEException
Adds call to this profile .