public MessageManager getMessageManager()
    {
        if (m_messageManager == null)
        {
        	MessageApp messageApplication = null;
        	BaseApplication app = null;
        	if (this.getRecord() != null)
        		if (this.getRecord().getRecordOwner() != null)
        			if (this.getRecord().getRecordOwner().getTask() != null)
        				app = (BaseApplication)this.getRecord().getRecordOwner().getTask().getApplication();
        	if (app != null)
        		messageApplication = app.getEnvironment().getMessageApplication(true, app.getProperties());
        	else
        		messageApplication = ((Environment)this.getDatabase().getDatabaseOwner().getEnvironment()).getMessageApplication(true, null);
            m_messageManager = RemoteMessageManager.getMessageManager(messageApplication);
        }
        return m_messageManager;
    }
public MessageManager getMessageManager ( ) { if ( m_messageManager == null ) { MessageApp messageApplication = null ; BaseApplication app = null ; if ( this . getRecord ( ) != null ) if ( this . getRecord ( ) . getRecordOwner ( ) != null ) if ( this . getRecord ( ) . getRecordOwner ( ) . getTask ( ) != null ) app = ( BaseApplication ) this . getRecord ( ) . getRecordOwner ( ) . getTask ( ) . getApplication ( ) ; if ( app != null ) messageApplication = app . getEnvironment ( ) . getMessageApplication ( true , app . getProperties ( ) ) ; else messageApplication = ( ( Environment ) this . getDatabase ( ) . getDatabaseOwner ( ) . getEnvironment ( ) ) . getMessageApplication ( true , null ) ; m_messageManager = RemoteMessageManager . getMessageManager ( messageApplication ) ; } return m_messageManager ; }
Don't create a new object each time.
@return