Examples of OCApp


Examples of com.ipc.oce.OCApp

  public OCSpreadsheetDocumentTemplateParameters getParameters() throws JIException {
    return new OCSpreadsheetDocumentTemplateParameters(get("Parameters"));
  }
 
  private void write(String filePath, String fileType) throws JIException {
    OCApp app = OCApp.getInstance(getAssociatedSessionID());
    StaticFieldInstance mode = app.getStaticFields(fileType);
    write(filePath, mode);
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

  public OCDataCompositionSettings getSettings() throws JIException {
    return new OCDataCompositionSettings(get("Settings"));
  }
 
  public String showXML() throws JIException {
    OCApp app = OCApp.getInstance(getAssociatedSessionID());
    OCXDTOSerializer ocxdtoSerializer = app.getXDTOSerializer();
    OCXMLWriter ocxmlWriter = app.newXMLWriter();
    ocxmlWriter.setString("UTF-8");
    ocxdtoSerializer.writeXML(ocxmlWriter, this);
   
    return ocxmlWriter.close();
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

      driver = ApplicationDriver.loadDriver((String) conProperties
          .get(PropertiesReader.OCE_CFG_DRIVER));
    }
   
    // magic is here
    OCApp app = OCApp.getNewInstance();
    app.setApplicationDriver(driver);
   
    try {
      app.connect(conProperties);
    } catch (SecurityException e) {
      throw new SQLException(e);
    } catch (JIException e) {
      throw new SQLException(e);
    } catch (IOException e) {
View Full Code Here

Examples of com.ipc.oce.OCApp

 
  private boolean fClose = false;

  protected OCEStatement(OCEConnection connection) {
    this.connection = connection;
    OCApp app = connection.getApplication();
    try {
      oceStatement = app.newQuery();
    } catch (JIException e) {
      throw new RuntimeException(e.toString());
    }
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

   * Получение xml-типа объекта.
   * @return
   * @throws JIException
   */
  public OCXMLDataType getXMLType() throws JIException {
    OCApp app = OCApp.getInstance(getAssociatedSessionID());
    return app.getXMLTypeOf(this);
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

   * Получение типа объекта
   * @return OCType
   * @throws JIException
   */
  public OCType getOCType() throws JIException {
    OCApp app = OCApp.getInstance(getAssociatedSessionID());
    return app.fromXMLType(getXMLType());
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

  @Override
  protected int poll() throws Exception {
    try{
      long start = System.currentTimeMillis();
      OCXEEndpoint ocxeEndpoint = (OCXEEndpoint) getEndpoint();
      OCApp application = ocxeEndpoint.getApp_instance();
     
      EventManager eventManager = new EventManager(ocxeEndpoint.getApp_instance(), tempCatalog);
      eventManager.setDeleteAfterUnload(true);
     
      Document docXml = eventManager.getEventLog(
            getTimePoint()
            null,
            null,
            ocxeEndpoint.getEventTypes() != null ? ocxeEndpoint.getEventTypes().toArray(new String[]{}) : (String[]) null,
            ocxeEndpoint.getListenForObjects() != null ? ocxeEndpoint.getListenForObjects().toArray(new String[]{}) : null
          );
   
      XPath xpath = FACTORY.newXPath();
      xpath.setNamespaceContext(application.getNamespaceContext());
      XPathExpression expr = xpath.compile(COUNT_V8E_EVENT_LOG_RECORDS);
      String xpathRes = expr.evaluate(docXml);
     
      int eventCount = Integer.parseInt(xpathRes);
     
View Full Code Here

Examples of com.ipc.oce.OCApp

      if (driver == null) {
        driver = new DefaultApplicationDriver();
      }
    }

    OCApp app = OCApp.getNewInstance();

    if (params.get("autoRegistration") != null) {
      Boolean autoReg = Boolean.valueOf(params
          .getProperty("autoRegistration"));
      driver.setAutoRegistration(autoReg);
    }

    app.setApplicationDriver(driver);

    try {
      int sessionNum = app.connect(params);
      LOG.info("Session number: " + sessionNum);
    } catch (SecurityException e) {
      throw new SQLException("Connection failed. Parameters " + params
          + ". " + e);
    } catch (JIException e) {
View Full Code Here

Examples of com.ipc.oce.OCApp

  public ResourceSessionAccessor() {
    super();
  }
 
  protected synchronized OCApp getApplication() throws IOException, ConfigurationException, JIException {
    OCApp app1 = null;
   
    if (sessionID != -1) { // получение инстанса из хранилища
      app1 = OCApp.getInstance(sessionID);
    }
   
    if (app1 == null) { // если sessionID == -1 или сессия удалена
      sessionID = createConnection();
      app1 = OCApp.getInstance(sessionID);
    } else if (!(app1.ping())) {
      try {
        app1.exit();
      } catch (Exception e) { // да и хрен с нимим с битыми ссылками
      }
      sessionID = createConnection();
      app1 = OCApp.getInstance(sessionID);
    }
View Full Code Here

Examples of com.ipc.oce.OCApp

   
   
    ApplicationDriver driver = ApplicationDriver.loadDriver(configuration
        .getProperty(PropertiesReader.OCE_CFG_DRIVER));

    OCApp app = OCApp.getNewInstance();
    app.setApplicationDriver(driver);
    int sessionCode = app.connect(configuration);
   
   
    return sessionCode;
  }
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.