Examples of ConnectionConfig


Examples of hermes.config.ConnectionConfig

      {
         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

Examples of hermes.config.ConnectionConfig

         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

Examples of hermes.config.ConnectionConfig

   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

Examples of hermes.config.ConnectionConfig

      {
         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

Examples of hermes.config.ConnectionConfig

    * @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

Examples of hermes.config.ConnectionConfig

   public FactoryConfig getFactoryConfig(HermesConfig config, String hermesId) throws HermesException
   {
      for (Iterator<FactoryConfig> factoryIter = config.getFactory().iterator(); factoryIter.hasNext();)
      {
         FactoryConfig factoryConfig = factoryIter.next();
         ConnectionConfig connectionConfig = (ConnectionConfig) factoryConfig.getConnection().get(0);

         if (connectionConfig.getSession().size() > 0)
         {
            SessionConfig sessionConfig = (SessionConfig) connectionConfig.getSession().get(0);

            if (sessionConfig.getId().equals(hermesId))
            {
               return factoryConfig;
            }
View Full Code Here

Examples of hermes.config.ConnectionConfig

    * @see hermes.impl.ConfigDAO#duplicate(hermes.config.ConnectionConfig,
    *      java.lang.String)
    */
   public ConnectionConfig duplicate(ConnectionConfig sourceConnection, String newSessionId) throws JAXBException
   {
      ConnectionConfig rval = factory.createConnectionConfig();
      SessionConfig sessionConfig = (SessionConfig) sourceConnection.getSession().get(0);

      rval.setPassword(sourceConnection.getPassword());
      rval.setUsername(sourceConnection.getUsername());

      rval.getSession().add(duplicate(sessionConfig, newSessionId));

      return rval;
   }
View Full Code Here

Examples of hermes.config.ConnectionConfig

    *      java.lang.String)
    */
   public FactoryConfig duplicate(FactoryConfig sourceFactory, String newSessionId) throws JAXBException
   {
      FactoryConfig rval = factory.createFactoryConfig();
      ConnectionConfig connectionConfig = (ConnectionConfig) sourceFactory.getConnection().get(0);

      rval.setClasspathId(sourceFactory.getClasspathId());
      rval.setExtension(sourceFactory.getExtension());
      rval.setProvider(sourceFactory.getProvider());

View Full Code Here

Examples of hermes.config.ConnectionConfig

      {
         public void actionPerformed(ActionEvent arg0)
         {
            try
            {
               ConnectionConfig cConfig = (ConnectionConfig) factoryConfig.getConnection().get(0);
               SessionConfig sConfig = (SessionConfig) cConfig.getSession().get(0);
               DestinationConfig dConfig = new DestinationConfig() ;
               dConfig.setDomain(Domain.QUEUE.getId()) ;
               dConfig.setName("NEW") ;

               destinationTableModel.addItem(dConfig) ;
               doEdit(sConfig.getId(), dConfig);
               dialog.setDirty();
            }
            catch (Exception ex)
            {
               cat.error(ex.getMessage(), ex);
            }
         }
      });

      removeItem.addActionListener(new ActionListener()
      {
         public void actionPerformed(ActionEvent arg0)
         {
            for (int row : destinationTable.getSelectedRows())
            {
               if (row >= 0)
               {
                  int realRow = destinationTable.getActualRowAt(row);
                  destinationTableModel.removeRow(realRow);
                  dialog.setDirty();
               }
            }
         }
      });

      mouseAdapter = new MouseAdapter()
      {
         public void mousePressed(MouseEvent e)
         {
            if (SwingUtilities.isRightMouseButton(e))
            {
               if (e.getComponent() == destinationTableSP)
               {
                  removeItem.setEnabled(false);
               }
               else
               {
                  removeItem.setEnabled(true);
               }

               popupMenu.show(e.getComponent(), e.getX(), e.getY());
            }
            else if (e.getClickCount() == 2)
            {
               int row = destinationTable.getActualRowAt(destinationTable.getSelectedRow());

               if (row >= 0)
               {
                  ConnectionConfig cConfig = (ConnectionConfig) factoryConfig.getConnection().get(0);
                  SessionConfig sConfig = (SessionConfig) cConfig.getSession().get(0);
                  doEdit(sConfig.getId(), destinationTableModel.getRowConfig(row));
               }
            }
         }
      };
View Full Code Here

Examples of hermes.config.ConnectionConfig

         {
            FactoryConfig factoryConfig = (FactoryConfig) iter.next();

            if (factoryConfig.getConnection().size() == 0)
            {
               factoryConfig.getConnection().add(new ConnectionConfig());
            }

            if (factoryConfig.getProvider().getProperties() == null)
            {
               factoryConfig.getProvider().setProperties(new PropertySetConfig());
            }

            connectionFactoryConfigPanel.setFactoryConfig(model, factoryConfig);
            destinationConfigPanel.setFactoryConfig(factoryConfig);

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

               connectionConfigPanel.setConnectionConfig(connectionConfig);

               for (Iterator iter4 = connectionConfig.getSession().iterator(); iter4.hasNext();)
               {
                  SessionConfig sessionConfig = (SessionConfig) iter4.next();

                  if (firstSessionId == null)
                  {
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.