コード例 #1
0
  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
ファイル: BaseTest.java プロジェクト: dzonekl/netxstudio
  /**
   * 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);
  }