Package com.sun.messaging.jmq.jmsspi

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


    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();
View Full Code Here


    {
        final PEFileLayout layout = getFileLayout(config);
        final String repositoryName = config.getRepositoryName();
        try
        {
            final JMSAdmin jmsAdmin = IASJmsUtil.getJMSAdminFactory().
                                                    getJMSAdmin();
            final ConfigContext ctx = getConfigContext(config);
            final Server[] servers = getServers(ctx);
            for (int i = 0; i < servers.length; i++)
            {
                final String mqInstanceName = IASJmsUtil.getBrokerInstanceName(
                    repositoryName,
                    servers[i].getName(),
                    getJmsService(servers[i], ctx));
                final String javaHome = getJavaHome(servers[i], ctx);

                try
                {
            String iMQBin = System.getProperty(
                                  SystemPropertyConstants.IMQ_BIN_PROPERTY,
                      layout.getImqBinDir().getAbsolutePath());
            String iMQInstances = layout.getRepositoryDir() + File.separator +
                                  IASJmsUtil.MQ_DIR_NAME;
            String[] optArgs = new String[4];

            optArgs[0] = "-javahome";
            optArgs[1] = javaHome;
            optArgs[2] = "-varhome";
            optArgs[3] = iMQInstances;

                    //4966940
                    jmsAdmin.deleteProviderInstance(
                iMQBin,
            optArgs,
                        mqInstanceName);
                    //4966940
                }
View Full Code Here

            jmsService = (JmsService)ConfigBeansFactory.getConfigBeanByXPath(
                configContext, ServerXPathHelper.XPATH_JMS_SERVICE);
       
            if ((jmsService != null) && (jmsService.isEnabled()))  {
                JMSAdmin  jmsAdmin = null;
                JavaConfig  javaConfig;
                    String    java_home = null,
                    domainName = null,
                        mqInstanceName = null,
                        mqBin = null,
                    argArray[] = new String [ 4 ];

                javaConfig = (JavaConfig)ConfigBeansFactory.getConfigBeanByXPath(
                configContext, ServerXPathHelper.XPATH_JAVACONFIG);
                java_home = javaConfig.getJavaHome();

                mqBin = System.getProperty("com.sun.aas.imqBin");
                domainName = ServerManager.instance().getDomainName();

                jmsAdmin = IASJmsUtil.getJMSAdminFactory().getJMSAdmin();

            /*
             * Use utility method to construct MQ broker instance name
             */
            mqInstanceName = IASJmsUtil.getBrokerInstanceName(domainName,
                        instanceName, jmsService);

            argArray[0] = "-javahome";
            argArray[1] = java_home;
            argArray[2] = "-varhome";
      String mqInstanceDir = instancesRoot + File.separator +
                       IASJmsUtil.MQ_DIR_NAME;
            argArray[3] = mqInstanceDir;

            /*
             * Call MQ SPI method to delete the instance.
             */
                jmsAdmin.deleteProviderInstance(mqBin, argArray, mqInstanceName);
            }
        }
        catch (Exception e)
      {
            sLogger.log(Level.FINE, "mbean.del_jms_instance_failed", e);
View Full Code Here

TOP

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

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.