Package com.sun.enterprise.connectors

Examples of com.sun.enterprise.connectors.ConnectorRuntimeException


                java.util.Map<String,JmsHost> hostMap =
                    rep.getResolvedLocalJmsHostsInCluster(target);

                if ( hostMap.size() == 0 ) {
                    String msg = sm.getString("mqjmx.no_jms_hosts");
                    throw new ConnectorRuntimeException(msg);
                }
               
                list = new MQAddressList();
                for (JmsHost host : hostMap.values()) {
                    list.addMQUrl(host);
                }
            }

            String connectionUrl = list.toString();
            String adminUserName = null;
       String adminPassword = null;
       JmsHost jmsHost = getDefaultJmsHost(jmsService);
       if (jmsHost != null && jmsHost.isEnabled()) {
           adminUserName = jmsHost.getAdminUserName();
           adminPassword = jmsHost.getAdminPassword();
       } else {
           logFine(" _getMQJMXConnectorInfo, using default jms admin user and password ");
       }
        raInstance = getConfiguredRA(mqRAClassName, connectionUrl,
                                    adminUserName, adminPassword);
        } catch (Exception e) {
            e.printStackTrace();
            ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
            cre.initCause(e);
            throw cre;
        }
       
        try {
            String jmxServiceURL = null, jmxServiceURLList = null;
            Map<String, ?> jmxConnectorEnv = null;
            Method[] methds = raInstance.getClass().getMethods();
            for (int i = 0; i < methds.length; i++) {
                Method m = methds[i];
                if (m.getName().equalsIgnoreCase("get" + JMXSERVICEURLLIST)){
                    jmxServiceURLList = (String)m.invoke(raInstance, new Object[]{});
                    if (jmxServiceURLList != null && !jmxServiceURLList.trim().equals("")){
                        jmxServiceURL = getFirstJMXServiceURL(jmxServiceURLList);
                    }
                } else if (m.getName().equalsIgnoreCase("get" + JMXCONNECTORENV)){
                    jmxConnectorEnv = (Map<String,?>)m.invoke(raInstance, new Object[]{});
                }
            }
            MQJMXConnectorInfo mqInfo = new MQJMXConnectorInfo(target,
                            ActiveJmsResourceAdapter.getBrokerInstanceName(jmsService) ,
                            jmsService.getType(), jmxServiceURL, jmxConnectorEnv);
            return mqInfo;
        } catch (Exception e) {
            e.printStackTrace();
            ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
            cre.initCause(e);
            throw cre;
        }
    }
View Full Code Here


                            ActiveJmsResourceAdapter.getBrokerInstanceName(jmsService) ,
                            jmsService.getType(), jmxServiceURL, jmxConnectorEnv);
            return mqInfo;
        } catch (Exception e) {
            e.printStackTrace();
            ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
            cre.initCause(e);
            throw cre;
        }
    }
View Full Code Here

    }


    private ConnectorRuntimeException handleException(Exception e) {
        logger.log(Level.WARNING,""+e.getMessage(), e);
        ConnectorRuntimeException cre =
             new ConnectorRuntimeException(e.getMessage());
        cre.initCause(e);
        return cre;
    }
View Full Code Here

            //XXX: Do we need to pass in a Subject?
            MBeanServerConnection mbsc = connector.getMBeanServerConnection();
            return mbsc;
        } catch (Exception e) {
            e.printStackTrace();
            ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
            cre.initCause(e);
            throw cre;
        }
    }
View Full Code Here

        try {
           if (connector != null) {
                 connector.close();
           }
        } catch (IOException e) {
            ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
            cre.initCause(e);
            throw cre;
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.connectors.ConnectorRuntimeException

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.