Package hermes.config

Examples of hermes.config.ConnectionConfig


          log.debug("cleaning up FactoryConfig with no connections");
          iter.remove();
          continue;
        }

        ConnectionConfig firstConnection = factoryConfig.getConnection().get(0);

        if (firstConnection.getSession().size() == 0) {
          log.debug("cleaning up FactoryConfig with no sessions");
          iter.remove();
          continue;
        }

        SessionConfig firstSession = firstConnection.getSession().get(0);

        if (firstSession.getId() == null) {
          log.debug("cleaning up FactoryConfig with a null session");
          iter.remove();
          continue;
View Full Code Here


        connectionFactoryManager.addDestinationConfig(destinationConfig);
      }
    }

    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);
View Full Code Here

            DestinationConfig destinationConfig = (DestinationConfig) iter2.next();
         }

         for (Iterator<ConnectionConfig> iter3 = factoryConfig.getConnection().iterator(); iter3.hasNext();)
         {
            ConnectionConfig connectionConfig = iter3.next();

            for (Iterator<SessionConfig> iter4 = connectionConfig.getSession().iterator(); iter4.hasNext();)
            {

               SessionConfig sessionConfig = iter4.next();

               if (sessionConfig.getId() == null)
View Full Code Here

         FactoryConfig factoryConfig = iter.next();

         for (Iterator<ConnectionConfig> iter3 = factoryConfig.getConnection().iterator(); iter3.hasNext();)
         {

            ConnectionConfig connectionConfig = iter3.next();

            for (Iterator<SessionConfig> iter4 = connectionConfig.getSession().iterator(); iter4.hasNext();)
            {

               SessionConfig sessionConfig = iter4.next();

               if (sessionConfig.getId().equals(hermesId))
View Full Code Here

      {
         FactoryConfig factoryConfig = iter1.next();

         for (Iterator<ConnectionConfig> iter2 = factoryConfig.getConnection().iterator(); iter2.hasNext();)
         {
            ConnectionConfig connectionConfig = iter2.next();

            for (Iterator<SessionConfig> iter3 = connectionConfig.getSession().iterator(); iter3.hasNext();)
            {
               SessionConfig sessionConfig = iter3.next();

               rval.add(sessionConfig);
            }
View Full Code Here

      {
         FactoryConfig factoryConfig = iter1.next();

         for (Iterator<ConnectionConfig> iter2 = factoryConfig.getConnection().iterator(); iter2.hasNext();)
         {
            ConnectionConfig connectionConfig = iter2.next();

            for (Iterator<SessionConfig> iter3 = connectionConfig.getSession().iterator(); iter3.hasNext();)
            {

               SessionConfig sessionConfig = iter3.next();

               if (sessionConfig.getId() == null)
View Full Code Here

         throws JAXBException
   {
      FactoryConfig factoryConfig = new FactoryConfig();
      factoryConfig.setClasspathId(classpathId);
      SessionConfig sessionConfig = new SessionConfig();
      ConnectionConfig connectConfig = new ConnectionConfig();
      ProviderConfig providerConfig = new ProviderConfig();

      sessionConfig.setId(sessionId);
      sessionConfig.setTransacted(true);
      sessionConfig.setReconnects(BigInteger.ZERO);

      connectConfig.getSession().add(sessionConfig);

      factoryConfig.getConnection().add(connectConfig);

      factoryConfig.setExtension(createDefaultProviderExtConfig(NullConnectionFactory.class.getName()));
View Full Code Here

   public FactoryConfig createDefaultFactoryConfig(String sessionId) throws JAXBException
   {
      FactoryConfig factoryConfig = new FactoryConfig();
      factoryConfig.setClasspathId(SimpleClassLoaderManager.SYSTEM_LOADER);
      SessionConfig sessionConfig = new SessionConfig();
      ConnectionConfig connectConfig = new ConnectionConfig();
      ProviderConfig providerConfig = new ProviderConfig();

      sessionConfig.setId(sessionId);
      connectConfig.getSession().add(sessionConfig);
      factoryConfig.getConnection().add(connectConfig);
      factoryConfig.setExtension(createDefaultProviderExtConfig(NullConnectionFactory.class.getName()));
      sessionConfig.setTransacted(true);

      providerConfig.setProperties(new PropertySetConfig());
View Full Code Here

      {
         final FactoryConfig factoryConfig = fIter.next();

         for (Iterator<ConnectionConfig> cIter = factoryConfig.getConnection().iterator(); cIter.hasNext();)
         {
            final ConnectionConfig connConfig = cIter.next();

            for (Iterator<SessionConfig> sIter = connConfig.getSession().iterator(); sIter.hasNext();)
            {
               final SessionConfig sConfig = sIter.next();

               if (sConfig.getId().equals(hermesId))
               {
View Full Code Here

    * @see hermes.impl.ConfigDAO#renameSession(hermes.config.FactoryConfig,
    *      java.lang.String)
    */
   public void renameSession(FactoryConfig factoryConfig, String newSessionId)
   {
      ConnectionConfig connectionConfig = (ConnectionConfig) factoryConfig.getConnection().get(0);
      SessionConfig sessionConfig = (SessionConfig) connectionConfig.getSession().get(0);

      sessionConfig.setId(newSessionId);
   }
View Full Code Here

TOP

Related Classes of hermes.config.ConnectionConfig

Copyright © 2018 www.massapicom. 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.