private static IManagedContainer createContainer() {
    IManagedContainer result = ContainerUtil.createPluginContainer();

    result.activate();

    return result;
  }
Пример #2
0
  protected IManagedContainer createContainer() {
    IManagedContainer container = ContainerUtil.createContainer();
    Net4jUtil.prepareContainer(container);
    if (useJVMTransport()) {
      JVMUtil.prepareContainer(container);
    } else {
      if (useSSLTransport()) {
        SSLUtil.prepareContainer(container);
      } else {
        TCPUtil.prepareContainer(container);
      }
    }

    return container;
  }
Пример #3
0
  /**
   * Initializes the connection and creates a {@link CDOSessionConfiguration} which is stored in a
   * member of this class.
   */
  protected void initialize() {
    OMPlatform.INSTANCE.setDebugging(true);
    OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
    OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);

    // Prepare container
    final IManagedContainer container = ContainerUtil.createContainer();
    Net4jUtil.prepareContainer(container); // Register Net4j factories
    TCPUtil.prepareContainer(container); // Register TCP factories
    CDONet4jUtil.prepareContainer(container); // Register CDO factories

    // LifecycleUtil.activate(container);
    container.activate();

    // Create connector
    final IConnector connector = TCPUtil.getConnector(container, CONNECTION_ADDRESS);

    // Create configuration
    sessionConfiguration = CDONet4jUtil.createSessionConfiguration();
    sessionConfiguration.setConnector(connector);
    sessionConfiguration.setRepositoryName(REPO_NAME);
  }