Examples of ConnectionManager


Examples of connection.server.ConnectionManager

    ControlledInputStream.initialize();
    ControlledOutputStream.initialize();

    statusManager = new NullStatusManager();

    connectionManager = new ConnectionManager();
    fileTable = new SharedFilesTable();

    searchManager = new SearchManager();

    uploadManager = new UploadManager();
View Full Code Here

Examples of cz.cuni.mff.inetpaint.ConnectionManager

     * Vytvoří nový objekt této třídy
     * @param JID Jabber ID kontaktu, se kterým se vede komunikace
     * @param fontSize Velikost písma
     */
    public MessagesPanel(String JID, int fontSize) {
        ConnectionManager manager = ConnectionManager.getInstance();
       
        this.nameFor = manager.getNameFor(JID);
        this.nameFrom = manager.getLocalName();
       
        String size = Integer.toString(fontSize);
       
        messagesTextPane = new JEditorPane("text/html", "<html>" +
                "<head>" +
View Full Code Here

Examples of de.fu_berlin.inf.dpp.videosharing.manager.ConnectionManager

            }

            activityManager = new ActivityManager(screen, this,
                connectionFactory.getActivitiesInputStream());

            connectionManager = new ConnectionManager(
                connectionFactory.getVideoOutputStream(), encoder,
                connectionFactory.getDecodingStatisticsInputStream(), this);

            encoder.startEncoding();
        }
View Full Code Here

Examples of hermes.impl.ConnectionManager

      }
    }

    if (factoryConfig.getConnection().size() > 0) {
      ConnectionConfig connectionConfig = factoryConfig.getConnection().get(0);
      ConnectionManager connectionManager = null;

      if (connectionConfig.isConnectionPerThread()) {
        connectionManager = ConnectionManagerFactory.create(ConnectionManager.Policy.CONNECTION_PER_THREAD);
      } else {
        connectionManager = ConnectionManagerFactory.create(ConnectionManager.Policy.SHARED_CONNECTION);
      }

      connectionManager.setClientID(connectionConfig.getClientID());
      connectionManager.setUsername(connectionConfig.getUsername());
      connectionManager.setPassword(connectionConfig.getPassword());

      if (connectionConfig.getSession().size() > 0) {
        SessionManager sessionManager;
        DestinationManager destinationManager;
        SessionConfig sessionConfig = connectionConfig.getSession().get(0);

        if (jndiFactory != null) {
          jndiFactory._setDelegateClassLoader(classLoader);

          destinationManager = new JNDIDestinationManager(jndiFactory._getProperties(), true);
          sessionManager = new ThreadLocalSessionManager(sessionConfig, destinationManager);
        } else {
          destinationManager = new SimpleDestinationManager();
          sessionManager = new ThreadLocalSessionManager(sessionConfig, destinationManager);
        }

        log.debug("SESSION IS " + sessionConfig.getId());

        if (sessionConfig.getReconnects() != null) {
          sessionManager.setReconnects(sessionConfig.getReconnects().intValue());
        }

        classLoaderManager.putClassLoaderByHermes(sessionConfig.getId(), classLoader);
        factoryConfigById.put(sessionConfig.getId(), factoryConfig);

        sessionManager.setTransacted(sessionConfig.isTransacted());
        sessionManager.setId(sessionConfig.getId());
        sessionManager.setFactoryConfig(factoryConfig);
        sessionManager.setAudit(sessionConfig.isAudit());

        sessionManager.setParent(connectionManager);
        connectionManager.setParent(connectionFactoryManager);

        if (config.getAuditDirectory() != null) {
          sessionManager.setAuditDirectory(config.getAuditDirectory());
        } else if (sessionConfig.getAuditDirectory() != null) {
          sessionManager.setAuditDirectory(sessionConfig.getAuditDirectory());
        }

        connectionManager.addChild(sessionManager);

        hermes = new DefaultHermesImpl(factoryConfig.getExtension(), sessionManager, classLoader);

        connectionFactoryManager.addChild(connectionManager);
        connectionManager.setHermes(hermes);
      }

    }
    return hermes;
  }
View Full Code Here

Examples of javax.resource.spi.ConnectionManager

   public static final String CONNECTION_MANAGER = "CONNECTION_MANAGER";
   public static final String MANAGED_CONNECTION_FACTORY = "MANAGED_CONNECTION_FACTORY";
  
   public Object invoke(Invocation invocation) throws Throwable
   {
      ConnectionManager cm = (ConnectionManager) invocation.getMetaData(CONNECTION_FACTORY, CONNECTION_MANAGER);
      ManagedConnectionFactory mcf = (ManagedConnectionFactory) invocation.getMetaData(CONNECTION_MANAGER, MANAGED_CONNECTION_FACTORY);
     
      return cm.allocateConnection(mcf, null);
   }
View Full Code Here

Examples of javax.resource.spi.ConnectionManager

*/
public class DataSourceTestCase extends AbstractProxyTest
{
   public void testConnectionManager() throws Exception
   {
      ConnectionManager cm = new TestConnectionManager();
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      SimpleMetaData metadata = new SimpleMetaData();
     
      metadata.addMetaData(ConnectionFactoryInterceptor.CONNECTION_FACTORY, ConnectionFactoryInterceptor.CONNECTION_MANAGER, cm);
      metadata.addMetaData(ConnectionFactoryInterceptor.CONNECTION_MANAGER, ConnectionFactoryInterceptor.MANAGED_CONNECTION_FACTORY, mcf);
View Full Code Here

Examples of javax.resource.spi.ConnectionManager

            connectionManagerRecipe.setProperty("classLoader", classLoader);

            logger.getChildLogger("service").info("createResource.createConnectionManager", serviceInfo.id, service.getClass().getName());

            // create the connection manager
            ConnectionManager connectionManager = (ConnectionManager) connectionManagerRecipe.create();
            if (connectionManager == null) {
                throw new RuntimeException(messages.format("assembler.invalidConnectionManager", serviceInfo.id));
            }

            Map<String, Object> unsetA = serviceRecipe.getUnsetProperties();
View Full Code Here

Examples of javax.resource.spi.ConnectionManager

            connectionManagerRecipe.setProperty("classLoader", classLoader);

            logger.getChildLogger("service").info("createResource.createConnectionManager", serviceInfo.id, service.getClass().getName());

            // create the connection manager
            ConnectionManager connectionManager = (ConnectionManager) connectionManagerRecipe.create();
            if (connectionManager == null) {
                throw new OpenEJBRuntimeException(messages.format("assembler.invalidConnectionManager", serviceInfo.id));
            }

            Map<String, Object> unsetA = serviceRecipe.getUnsetProperties();
View Full Code Here

Examples of javax.resource.spi.ConnectionManager

        // Create an embedded database for testing tx results when commit / rollback
        ConnectionManagerFactoryBean factory = new ConnectionManagerFactoryBean();
        factory.setTransactionManager(tm);
        factory.setTransaction("xa");
        factory.afterPropertiesSet();
        ConnectionManager cm = (ConnectionManager) factory.getObject();
        ManagedConnectionFactory mcf = new DerbyDataSourceMCF("target/testdb");
        dataSource = (DataSource) mcf.createConnectionFactory(cm);

        JdbcStoreFactory storeFactory = new JdbcStoreFactory();
        storeFactory.setDataSource(dataSource);
View Full Code Here

Examples of javax.resource.spi.ConnectionManager

        // Create an embedded database for testing tx results when commit / rollback
        ConnectionManagerFactoryBean cmFactory = new ConnectionManagerFactoryBean();
        cmFactory.setTransactionManager(tm);
        cmFactory.setTransaction("xa");
        cmFactory.afterPropertiesSet();
        ConnectionManager cm = (ConnectionManager) cmFactory.getObject();
        ManagedConnectionFactory mcf = new DerbyDataSourceMCF("target/testdb");
        dataSource = (DataSource) mcf.createConnectionFactory(cm);
        JdbcStoreFactory f = new JdbcStoreFactory();
        f.setTransactional(true);
        f.setDataSource(dataSource);
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.