private void createDestination ( String name , com . ibm . wsspi . sib . core . DestinationType destType , Reliability defaultReliability ) throws JMSException { if ( tcInt . isEntryEnabled ( ) ) SibTr . entry ( tcInt , "createDestination(String, DestinationType)" ) ; if ( tcInt . isDebugEnabled ( ) ) { SibTr . debug ( tcInt , "name: " + name ) ; SibTr . debug ( tcInt , "type: " + destType ) ; } try { try { // Obtain information about the destination from the core connection. SIDestinationAddress sida = JmsServiceFacade . getSIDestinationAddressFactory ( ) . createSIDestinationAddress ( name , null ) ; DestinationConfiguration dc = coreConnection . getDestinationConfiguration ( sida ) ; // If the Destination exists, then recreate it. if ( dc != null ) { String uuid = dc . getUUID ( ) ; if ( tcInt . isDebugEnabled ( ) ) SibTr . debug ( tcInt , "delete UUID: " + uuid ) ; // The destination has been found, so delete it. admin . deleteDestinationLocalization ( uuid , null ) ; } else { if ( tcInt . isDebugEnabled ( ) ) SibTr . debug ( tcInt , "No object was returned from getDestinationConfiguration" ) ; } } catch ( SINotPossibleInCurrentConfigurationException f ) { // No FFDC code needed // This is OK. No action required. } //lohith liberty change com . ibm . ws . sib . admin . DestinationDefinition adminDDF = null ; //JsAdminFactory.getInstance(.createDestinationDefinition(destType, name); adminDDF . setMaxReliability ( Reliability . ASSURED_PERSISTENT ) ; adminDDF . setDefaultReliability ( defaultReliability ) ; // Set the default exception destination String excDestinationName = SIMPConstants . SYSTEM_DEFAULT_EXCEPTION_DESTINATION + getMEName ( ) ; adminDDF . setExceptionDestination ( excDestinationName ) ; //lohith liberty change LocalizationDefinition dloc = null ; // JsAdminFactory.getInstance().createLocalizationDefinition(name); // Make sure the max message count is outside the range used by the tests. dloc . setDestinationHighMsgs ( 30000 ) ; //lohith liberty change admin . createDestinationLocalization ( adminDDF , dloc ) ; //, null, null, null, null); } catch ( Exception se ) { // No FFDC code needed if ( tcInt . isDebugEnabled ( ) ) SibTr . debug ( tcInt , "Exception creating" , se ) ; // NB. No need to NLS this because it is only for unit test. JMSException jmse = new JMSException ( "Exception received creating destination" ) ; jmse . setLinkedException ( se ) ; jmse . initCause ( se ) ; if ( tcInt . isEntryEnabled ( ) ) SibTr . exit ( tcInt , "createDestination(String, DestinationDefinition)" ) ; throw jmse ; } if ( tcInt . isEntryEnabled ( ) ) SibTr . exit ( tcInt , "createDestination(String, DestinationDefinition)" ) ; }
Internal method to do the creation given a name a ddf .