Exemple #1
0
 @Override
 protected CDOSessionConfiguration createSessionConfiguration(
     String authority, String repositoryName, IProgressMonitor monitor) {
   CDONet4jSessionConfiguration configuration = CDONet4jUtil.createNet4jSessionConfiguration();
   configuration.setConnector(getConnector(authority, monitor));
   configuration.setRepositoryName(repositoryName);
   return configuration;
 }
 /** Subclasses may override. */
 public CDONet4jSessionConfiguration createSessionConfiguration(
     IConnector connector, CDOBranchManager branchManager, CDORevisionManager revisionManager) {
   CDONet4jSessionConfiguration configuration = CDONet4jUtil.createNet4jSessionConfiguration();
   configuration.setConnector(connector);
   configuration.setRepositoryName(repositoryName);
   configuration.setSignalTimeout(Integer.MAX_VALUE);
   configuration.setBranchManager(branchManager);
   configuration.setRevisionManager(revisionManager);
   return configuration;
 }
Exemple #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);
  }