Examples of DbPositionMaster


Examples of com.opengamma.masterdb.position.DbPositionMaster

  }

  //-------------------------------------------------------------------------
  @Override
  public DbPositionMaster createObject() {
    DbPositionMaster master = new DbPositionMaster(getDbConnector());
    if (getUniqueIdScheme() != null) {
      master.setUniqueIdScheme(getUniqueIdScheme());
    }
    if (getMaxRetries() != null) {
      master.setMaxRetries(getMaxRetries());
    }
    if (getJmsConnector() != null) {
      JmsChangeManager cm = new JmsChangeManager(getJmsConnector().ensureTopicName(getJmsChangeManagerTopic()));
      master.setChangeManager(cm);
      cm.start();
    }
    return master;
  }
View Full Code Here

Examples of com.opengamma.masterdb.position.DbPositionMaster

  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) {
    ComponentInfo info = new ComponentInfo(PositionMaster.class, getClassifier());
   
    // create
    DbPositionMaster master = new DbPositionMaster(getDbConnector());
    if (getUniqueIdScheme() != null) {
      master.setUniqueIdScheme(getUniqueIdScheme());
    }
    if (getMaxRetries() != null) {
      master.setMaxRetries(getMaxRetries());
    }
    if (getJmsChangeManagerTopic() != null) {
      JmsChangeManager cm = new JmsChangeManager(getJmsConnector(), getJmsChangeManagerTopic());
      master.setChangeManager(cm);
      repo.registerLifecycle(cm);
      if (getJmsConnector().getClientBrokerUri() != null) {
        info.addAttribute(ComponentInfoAttributes.JMS_BROKER_URI, getJmsConnector().getClientBrokerUri().toString());
      }
      info.addAttribute(ComponentInfoAttributes.JMS_CHANGE_MANAGER_TOPIC, getJmsChangeManagerTopic());
    }
    checkSchema(master.getSchemaVersion(), "pos");
   
    // register
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemotePositionMaster.class);
    info.addAttribute(ComponentInfoAttributes.UNIQUE_ID_SCHEME, master.getUniqueIdScheme());
    repo.registerComponent(info, master);
   
    // publish
    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataDbPositionMasterResource(master));
View Full Code Here

Examples of com.opengamma.masterdb.position.DbPositionMaster

  public void doSetUp() throws Exception {
    _tempFile = File.createTempFile("portfolio-", ".csv");
    s_logger.info("Created temp file: " + _tempFile.getAbsolutePath());

    _portfolioMaster = new DbPortfolioMaster(getDbConnector());
    _positionMaster = new DbPositionMaster(getDbConnector());
    _securityMaster = new DbSecurityMaster(getDbConnector());

    _toolContext = new ToolContext();
    _toolContext.setPortfolioMaster(_portfolioMaster);
    _toolContext.setPositionMaster(_positionMaster);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.