Package hermes

Examples of hermes.HermesRuntimeException


  public static DataDictionary getDictionary(String beginString) throws FIXException {
    DataDictionary dictionary = dictionaryCache.get(beginString);
    if (dictionary == null) {
      if (!BEGIN_STRINGS.contains(beginString)) {
        throw new HermesRuntimeException("Invalid FIX BeginString: '" + beginString + "'.");
      }
      String dictionaryFileName = null ;
     
      if (beginString.equals(FixVersions.BEGINSTRING_FIXT11)) {
        dictionaryFileName = "quickfix/" + FixVersions.FIX50.replaceAll("\\.", "") + ".xml";
      } else {
        dictionaryFileName = "quickfix/" + beginString.replaceAll("\\.", "") + ".xml";
      }

      
      // the dictionary is loaded from the quickfix.jar file.
      InputStream ddis = Thread.currentThread().getContextClassLoader().getResourceAsStream(dictionaryFileName);
      if (ddis == null) {
        throw new NullPointerException("Data Dictionary file '" + dictionaryFileName + "' not found at root of CLASSPATH.");
      }

      try {
        dictionary = new DataDictionary(ddis);
        dictionaryCache.put(beginString, dictionary);
      } catch (ConfigError configError) {
        throw new HermesRuntimeException("Error loading data dictionary file.", configError);
      }

    }
    return dictionary;
  }
View Full Code Here


        }
      }

      throw new FieldNotFound(field.getClass().getName());
    } catch (FieldNotFound ex) {
      throw new HermesRuntimeException(ex);
    }
  }
View Full Code Here

                     consumer = topicSession.createSubscriber(topic, dConfig.getSelector(), false);
                  }
               }
               else
               {
                  throw new HermesRuntimeException("The session is JMS 1.0.2b and not in the topic domain.");
               }
            }
         }

         iter = new Enumeration();
View Full Code Here

      {
         return new ConnectionSharedManager();
      }
      else
      {
         throw new HermesRuntimeException("Invalid ConnectionManager policy");
      }
   }
View Full Code Here

      }
      catch (Exception ex)
      {
         close() ;
        
         throw new HermesRuntimeException(ex);
      }
   }
View Full Code Here

        return getAllFields().get(field).getObject().toString();
      } else {
        throw new FieldNotFound("No such field " + field);
      }
    } catch (FieldNotFound e) {
      throw new HermesRuntimeException(e);
    }
  }
View Full Code Here

          return message;
        } catch (InvalidMessage e) {
          log.error("Ignoring invalid message: " + e.getMessage(), e);
          return null;
        } catch (Exception e) {
          throw new HermesRuntimeException(e);
        }
      } else {
        return getCache().get(this);
      }
    } finally {
View Full Code Here

      try {
        getCache().put(AbstractQuickFIXMessage.this, new Message((String) object));
      } catch (Exception ex) {
        log.error(ex.getMessage(), ex);

        throw new HermesRuntimeException(ex);
      }
    }
View Full Code Here

            actions.put(clazz, action);
            return action;
         }
         catch (InstantiationException e)
         {
           throw new HermesRuntimeException(e) ;
         }
         catch (IllegalAccessException e)
         {
            throw new HermesRuntimeException(e) ;
         }
      }
   }
View Full Code Here

      }

      catch (JMSException ex) {
        log.error(ex.getMessage(), ex);
      } catch (NamingException ex) {
        throw new HermesRuntimeException(ex);
      }
    }

    if (config.isCopyJMSType()) {
      try {
View Full Code Here

TOP

Related Classes of hermes.HermesRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.