Package com.sun.messaging.jmq.jmsspi

Examples of com.sun.messaging.jmq.jmsspi.JMSAdminFactory


     * Use Class.forName() to bootstrap an instance
     * in order to avoid compile-time dependencies on
     * implementation class names.
     */
    public static JMSAdminFactory getJMSAdminFactory() throws Exception {
        JMSAdminFactory jmsAdminFactory = null;

        Class jmsAdminFactoryClass = Class.forName("com.sun.messaging.jmq.admin.jmsspi.JMSAdminFactoryImpl");
        jmsAdminFactory = (JMSAdminFactory)jmsAdminFactoryClass.newInstance();

        checkVersion(jmsAdminFactory.getJMSAdmin());

        return jmsAdminFactory;
    }
View Full Code Here


     */
    private synchronized JMSAdmin getJMSAdmin() throws Exception
    {
        ConfigContext serverContext;
        JmsService jmsService;
        JMSAdminFactory jmsaf;
        JMSAdmin _jmsAdmin = null;
        String instanceName, portStr, username, password, localhost, jmsAdminURL;

        serverContext = getConfigContext();

        jmsaf = IASJmsUtil.getJMSAdminFactory();

        jmsService = (JmsService)ConfigBeansFactory.getConfigBeanByXPath(
            serverContext, ServerXPathHelper.XPATH_JMS_SERVICE);

        localhost = java.net.InetAddress.getLocalHost().getHostName();
        JmsHost hostElement = jmsService.getJmsHost(0)//ms1 krav
        portStr = hostElement.getPort();
        username = hostElement.getAdminUserName();
        password = RelativePathResolver.getRealPasswordFromAlias(hostElement.getAdminPassword());
        jmsAdminURL = localhost + ((portStr == null) ?
                        "" : ":" + portStr);

        _jmsAdmin = jmsaf.getJMSAdmin(jmsAdminURL, username, password);

        return _jmsAdmin;
    }
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.jmsspi.JMSAdminFactory

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.