private final JsMessageImpl createNew ( ) throws MessageCopyFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createNew" ) ; JsMessageImpl newMsg = null ; Class msgClass = this . getClass ( ) ; try { /* Create the new JsMessage*/ newMsg = ( JsMessageImpl ) msgClass . newInstance ( ) ; /* copy transients before copying JMO to ensure safe ordering - see SIB0121.mfp.2 */ copyTransients ( newMsg ) ; /* Get a new copy of the JMO and set it into the new message*/ JsMsgObject newJmo = jmo . getCopy ( ) ; newMsg . setJmo ( newJmo ) ; } catch ( IllegalAccessException e1 ) { FFDCFilter . processException ( e1 , "com.ibm.ws.sib.mfp.impl.JsMessageImpl.createNew" , "jsm1600" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "IllegalAccessException " + e1 . getMessage ( ) + " instantiating class " + msgClass . getName ( ) ) ; throw new MessageCopyFailedException ( e1 ) ; } catch ( InstantiationException e2 ) { FFDCFilter . processException ( e2 , "com.ibm.ws.sib.mfp.impl.JsMessageImpl.createNew" , "jsm1610" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "InstantiationException " + e2 . getMessage ( ) + " instantiating class " + msgClass . getName ( ) ) ; throw new MessageCopyFailedException ( e2 ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "createNew" , newMsg ) ; return newMsg ; }
Return a new Jsmessage of the same specialization as this containing the given JsMsgObject .