Package com.sun.enterprise.connectors.jms.config

Examples of com.sun.enterprise.connectors.jms.config.JmsHost


            defaultSetup();
        } else {
            //For LOCAL or EMBEDDED standalone server instances, we need to resolve
            //the JMSHost
            logFine("LOCAL/EMBEDDED Standalone server instance");
            JmsHost host = getResolvedJmsHostForStandaloneServerInstance(this.targetName);
            MQUrl url = createUrl(host);
            urlList.add(url);
        }
    }
View Full Code Here


     */
    private void setupForCluster() throws Exception {
        java.util.Map<String,JmsHost> hostMap =
            getResolvedLocalJmsHostsInMyCluster(true);
        //First add my jms host.
        JmsHost jmsHost = hostMap.get(myName);
        MQUrl myUrl = createUrl(jmsHost, nodeHost);
        urlList.add(myUrl);
        hostMap.remove(myName);

        // Add all buddies to URL.
View Full Code Here

            final Server[] buddies = getServersInCluster(cluster);
            for (final Server as : buddies) {
                if (!includeMe && myName.equals(as.getName()))
                    continue;

                JmsHost copy = null;
                try {
                            copy  = getResolvedJmsHost(as);
                    } catch (Exception e) {
                      //e.printStackTrace();
                }
View Full Code Here

            logFine(" getresolved " + serverName);
       //ConfigContext con =  getAdminConfigContext();
       Server serverInstance = getServerByName(serverName);
       if (logger.isLoggable(Level.FINE))
           logFine("serverinstace " + serverInstance);
       JmsHost jmsHost = getResolvedJmsHost(serverInstance);
       return jmsHost;
    }
View Full Code Here

    //    if (JMSServiceType.LOCAL.toString().equals(jmsService.getType())  || JMSServiceType.EMBEDDED.toString().equals(jmsService.getType())) {
      //      jmsHost = getDefaultJmsHost(jmsService);
        //}
       // return ( jmsHost );

        JmsHost jmsHost   = getResolvedLocalJmsHostInServer(as);
        JmsHost copy      = createJmsHostCopy(jmsHost, as);

        String hostName = getNodeHostName(as);
        String port = JmsRaUtil.getJMSPropertyValue(as) ;//"JMS_PROVIDER_PORT", "7676");
        copy.setHost(hostName);
        copy.setPort(port);

        return copy;
    }
View Full Code Here

        return copy;
    }

    private JmsHost createJmsHostCopy(final JmsHost jmsHost, final Server server)
        {
        JmsHost jmsHostCopy = new JmsHostWrapper();


        try {
            jmsHostCopy.setAdminPassword(jmsHost.getAdminPassword());
            jmsHostCopy.setAdminUserName(jmsHost.getAdminUserName());
            jmsHostCopy.setName(jmsHost.getName());
            jmsHostCopy.setHost(jmsHost.getHost());
            jmsHostCopy.setPort(jmsHost.getPort());
        } catch(Exception tfe) {
            tfe.printStackTrace();//todo: handle this exception
        }
        return jmsHostCopy;
     }
View Full Code Here

     private JmsHost getResolvedLocalJmsHostInServer(final Server server)  {
        Config config = getConfigForServer(server);
        if (config != null)
        {
            JmsService jmsService = config.getExtensionByType(JmsService.class);
            JmsHost jmsHost = null;
             if (JMSServiceType.LOCAL.toString().equals(jmsService.getType())  || JMSServiceType.EMBEDDED.toString().equals(jmsService.getType())) {
            jmsHost = getDefaultJmsHost(jmsService);
            }
            return ( jmsHost );
View Full Code Here

     }

    public JmsHost getDefaultJmsHost(JmsService jmsService){
        String defaultJmsHost=   jmsService.getDefaultJmsHost();
        List <JmsHost> jmsHosts = jmsService.getJmsHost();
        JmsHost jmsHost = null;
        if (defaultJmsHost != null && ! defaultJmsHost.equals("") && jmsHosts != null && jmsHosts.size()> 0){
            for (int i=0; i <jmsHosts.size(); i++)
                   if (defaultJmsHost.equals((jmsHosts.get(i)).getName()))
                          return (JmsHost)jmsHosts.get(i);
            }
View Full Code Here

        String integrationMode =jmsService.getType();
        List <JmsHost> jmsHostList = jmsService.getJmsHost();
        if (jmsHostList == null) return false;

        String defaultJmsHostName = jmsService.getDefaultJmsHost();
        JmsHost defaultJmsHost = null;
        for (JmsHost host : jmsHostList){
            if(defaultJmsHostName != null && defaultJmsHostName.equals(host.getName())) {
                    defaultJmsHost = host;
                break;
            }
        }
        if(defaultJmsHost == null && jmsHostList.size() >0)  {
            defaultJmsHost = jmsHostList.get(0);
        }
      boolean lazyInit = false;
        if (defaultJmsHost != null)
                lazyInit = Boolean.parseBoolean(defaultJmsHost.getLazyInit());


        //we don't manage lifecycle of remote brokers
        if(REMOTE.equals(integrationMode))
                return false;
View Full Code Here

    {

        JmsHostWrapper clone = new JmsHostWrapper();
        if(! (proxy instanceof JmsHost)) return null;

        JmsHost host = (JmsHost)proxy;
        try{
        clone.setHost(host.getHost());
        clone.setPort(host.getPort());
        clone.setName(host.getName());
        clone.setAdminPassword(host.getAdminPassword());
        clone.setAdminUserName(host.getAdminUserName());
        }catch (PropertyVetoException e)
        {
            //todo : handle this exception
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.connectors.jms.config.JmsHost

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.