private MessageItemReference addProxyReference ( MessageItem msg , MessageProcessorSearchResults matchingPubsubOutputHandlers , TransactionCommon tran ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addProxyReference" , new Object [ ] { msg , tran } ) ; MessageItemReference ref = new MessageItemReference ( msg ) ; // This ensures that the persitence of the MessageItem cannot be downgaded // by the consumerDispatcher because we have remote subscribers. msg . addPersistentRef ( ) ; ref . setSearchResults ( matchingPubsubOutputHandlers ) ; try { ref . registerMessageEventListener ( MessageEvents . POST_COMMIT_ADD , this ) ; ref . registerMessageEventListener ( MessageEvents . POST_ROLLBACK_ADD , this ) ; Transaction msTran = _messageProcessor . resolveAndEnlistMsgStoreTransaction ( tran ) ; _proxyReferenceStream . add ( ref , msTran ) ; } catch ( OutOfCacheSpace e ) { // No FFDC code needed SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addProxyReference" , "SIResourceException" ) ; throw new SIResourceException ( e ) ; } catch ( MessageStoreException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.PubSubInputHandler.addProxyReference" , "1:2315:1.329.1.1" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.PubSubInputHandler" , "1:2322:1.329.1.1" , e } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addProxyReference" , e ) ; throw new SIResourceException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.PubSubInputHandler" , "1:2332:1.329.1.1" , e } , null ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addProxyReference" ) ; return ref ; }
Add a msg reference to the proxy subscription reference stream .