static public InputStream findJMSConfig(String customConfigFileName) throws Exception {
  URL configURL=null;
  String filePath=Constants.Jms.JMS_CONFIG_DIRECTORY;
  boolean isFullURLPath=false;
  try {
    configURL=new URL(customConfigFileName);
  }
 catch (  MalformedURLException e) {
  }
  if (configURL != null) {
    if (!JSpaceUtilities.isEmpty(configURL.getProtocol())) {
      filePath=configURL.getFile();
      isFullURLPath=true;
    }
  }
  if (!isFullURLPath) {
    if (customConfigFileName != null) {
      filePath=Constants.Jms.JMS_CONFIG_DIRECTORY + customConfigFileName;
    }
 else {
      filePath=Constants.Jms.JMS_CONFIG_DIRECTORY + Constants.Jms.JMS_CONFIG_FILE_NAME;
    }
  }
  InputStream inputStream=getResourceStream(filePath);
  if (inputStream == null) {
    String missingJMSConfigFileMsg="Could not find the JMS configuration file '" + filePath + "'. It does not exist or not readable.";
    throw new Exception(missingJMSConfigFileMsg);
  }
 else {
    if (_logger.isLoggable(Level.INFO)) {
      _logger.info("Loaded the JMS configuration file from < " + getResourceURL(filePath) + " > ");
    }
  }
  return inputStream;
}

static public InputStream findJMSConfig ( String customConfigFileName ) throws Exception { URL configURL = null ; String filePath = Constants . Jms . JMS_CONFIG_DIRECTORY ; boolean isFullURLPath = false ; try { configURL = new URL ( customConfigFileName ) ; } catch ( MalformedURLException e ) { } if ( configURL != null ) { if ( ! JSpaceUtilities . isEmpty ( configURL . getProtocol ( ) ) ) { filePath = configURL . getFile ( ) ; isFullURLPath = true ; } } if ( ! isFullURLPath ) { if ( customConfigFileName != null ) { filePath = Constants . Jms . JMS_CONFIG_DIRECTORY + customConfigFileName ; } else { filePath = Constants . Jms . JMS_CONFIG_DIRECTORY + Constants . Jms . JMS_CONFIG_FILE_NAME ; } } InputStream inputStream = getResourceStream ( filePath ) ; if ( inputStream == null ) { String missingJMSConfigFileMsg = "Could not find the JMS configuration file '" + filePath + "'. It does not exist or not readable." ; throw new Exception ( missingJMSConfigFileMsg ) ; } else { if ( _logger . isLoggable ( Level . INFO ) ) { _logger . info ( "Loaded the JMS configuration file from < " + getResourceURL ( filePath ) + " > " ) ; } } return inputStream ; }
find in classpath jms - config file .
