Package hermes.config

Examples of hermes.config.NamingConfig


    return browserTreePane.getBrowserTree();
  }

  public Context createContext(String id) throws JMSException, NamingException, InvocationTargetException, IOException, IllegalAccessException,
      NoSuchMethodException {
    final NamingConfig config = getBrowserTree().getBrowserModel().getNamingConfigTreeNode(id).getConfig();
    final JNDIContextFactory factory = new JNDIContextFactory(config);
    return factory.createContext();
  }
View Full Code Here


    if (oldConfig != null) {
      Set naming = new HashSet();
      naming.addAll(oldConfig.getNaming());

      for (Iterator iter = naming.iterator(); iter.hasNext();) {
        NamingConfig oldNaming = (NamingConfig) iter.next();

        loader.notifyNamingRemoved(oldNaming);
      }
    }
View Full Code Here

          // NOP
        }
      }

      for (Iterator namingIter = config.getNaming().iterator(); namingIter.hasNext();) {
        NamingConfig namingConfig = (NamingConfig) namingIter.next();

        listener.onNamingAdded(namingConfig);
      }
    } catch (NamingException e) {
      log.error(e.getMessage(), e);
View Full Code Here

  
   public void actionPerformed(ActionEvent arg0)
   {
      try
      {
          final NamingConfig newConfig = new NamingConfig();
         
          newConfig.setClasspathId(SimpleClassLoaderManager.SYSTEM_LOADER);
          newConfig.setProperties(new PropertySetConfig());

          final String newName = JOptionPane.showInputDialog(HermesBrowser.getBrowser(), "Name:", "Enter InitialContext Name", JOptionPane.PLAIN_MESSAGE);

          if ( newName != null && !newName.equals(""))
          {
              newConfig.setId(newName);

              EditNamingConfigDialog dialog = new EditNamingConfigDialog(HermesBrowser.getBrowser(), newConfig, HermesBrowser.getBrowser().getConfig()
                      .getNaming());

              dialog.pack();
View Full Code Here

    */
   public void removeNamingConfig(HermesConfig config, String id)
   {
      for (Iterator<?> iter = config.getNaming().iterator(); iter.hasNext();)
      {
         NamingConfig namingConfig = (NamingConfig) iter.next();

         if (namingConfig.getId().equals(id))
         {
            iter.remove();
         }
      }
   }
View Full Code Here

    protected void onOK()
    {
        try
        {
            final NamingConfig config = (NamingConfig) namingConfigsByName.get(comboBox.getSelectedItem());
            final Map map = PropertyUtils.describe(bean);

            config.setClasspathId(classpathIdProperty.getValue().toString());

            if (config.getProperties() == null)
            {
                config.setProperties(new PropertySetConfig());
            }
            else
            {
                config.getProperties().getProperty().clear();
            }

            HermesBrowser.getConfigDAO().populatePropertySet(map, config.getProperties());

            if (config == newConfig)
            {
                namingConfigs.add(config);
            }
View Full Code Here

            model.addElement(newConfig.getId());
        }

        for (Iterator iter = namingConfigs.iterator(); iter.hasNext();)
        {
            NamingConfig config = (NamingConfig) iter.next();

            namingConfigsByName.put(config.getId(), config);
            model.addElement(config.getId());

            if (selectedConfig == null)
            {
                selectedConfig = config.getId();
            }
        }

        return model;
View Full Code Here

  public void doSelectionChanged()
    {
        try
        {
            final String selectedConfig = (String) comboBox.getSelectedItem();
            final NamingConfig config = (NamingConfig) namingConfigsByName.get(selectedConfig);
            final PropertySetConfig propertySet = config.getProperties();

            if (currentSelection == null || !currentSelection.equals(selectedConfig))
            {
                currentSelection = selectedConfig;

                bean = new JNDIContextFactory();

                LoaderSupport.populateBean(bean, propertySet);

                final Map properties = PropertyUtils.describe(bean);
                final List list = new ArrayList();

                classpathIdProperty = new Property("loader", "Classpath Loader to use.", String.class)
                {
                    /**
           *
           */
          private static final long serialVersionUID = -3071689960943636606L;
          private String classpathId = config.getClasspathId();

                    public void setValue(Object value)
                    {
                        classpathId = value.toString();
                    }
View Full Code Here

TOP

Related Classes of hermes.config.NamingConfig

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.