Package org.apache.geronimo.kernel

Examples of org.apache.geronimo.kernel.Kernel.invoke()


            if (jmxRefAddr.getKernelName() == null) {
                kernel = Kernel.getSingleKernel();
            } else {
                kernel = Kernel.getKernel(jmxRefAddr.getKernelName());
            }
            Object proxy = kernel.invoke(jmxRefAddr.getTargetName(), "getProxy");
            if (proxy == null) {
                throw new IllegalStateException("Proxy not returned. Target " + jmxRefAddr.getTargetName() + " not started");
            }
            if (!jmxRefAddr.getInterface().isAssignableFrom(proxy.getClass())) {
                throw new IllegalStateException("Proxy does not implement expected interface " + jmxRefAddr.getInterface());
View Full Code Here


    }

    public void deployPlan(File moduleFile, File planFile) {
        try {
            Kernel kernel = KernelRegistry.getSingleKernel();
            List list = (List) kernel.invoke(ObjectNameConstants.DEPLOYER_OBJECT_NAME, DEPLOY_METHOD,
                    new Object[] {moduleFile, planFile}, DEPLOYER_ARGS);
            ConfigurationManager configurationManager = ConfigurationUtil
                    .getConfigurationManager(kernel);
            for (Iterator iterator = list.iterator(); iterator.hasNext();) {
                Artifact configID = Artifact.create((String)iterator.next());
View Full Code Here

    }

    private void connectInternalProxy() throws Throwable {
        Kernel kernel = KernelRegistry.getKernel(kernelName);
        try {
            internalProxy = kernel.invoke(targetName, "$getConnectionFactory");
        } catch (Exception e) {
            throw new IllegalStateException("Could not connect proxy to ManagedConnectionFactoryWrapper").initCause(e);
        }
    }
}
View Full Code Here

            throw (IllegalArgumentException) new IllegalArgumentException("Invalid object name in jmxRefAddr: " + containerId).initCause(e);
        }

        Object proxy = null;
        try {
            proxy = kernel.invoke(target, "$getResource");
        } catch (Exception e) {
            throw (IllegalStateException) new IllegalStateException("Could not get proxy").initCause(e);
        }
        if (proxy == null) {
            throw new IllegalStateException("Proxy not returned. Target " + containerId + " not started");
View Full Code Here

            mbeanServerKernelBridge.setAttribute("mbeanServerId", mbeanServerId);
            kernel.loadGBean(mbeanServerKernelBridge, classLoader);
            kernel.startGBean(mbeanServerKernelBridgeName);

            // start this configuration
            kernel.invoke(configName, "loadGBeans", new Object[]{null}, new String[]{ManageableAttributeStore.class.getName()});
            kernel.invoke(configName, "startRecursiveGBeans");
            monitor.systemStarted(kernel);

            GBeanQuery query = new GBeanQuery(null, PersistentConfigurationList.class.getName());
View Full Code Here

            kernel.loadGBean(mbeanServerKernelBridge, classLoader);
            kernel.startGBean(mbeanServerKernelBridgeName);

            // start this configuration
            kernel.invoke(configName, "loadGBeans", new Object[]{null}, new String[]{ManageableAttributeStore.class.getName()});
            kernel.invoke(configName, "startRecursiveGBeans");
            monitor.systemStarted(kernel);

            GBeanQuery query = new GBeanQuery(null, PersistentConfigurationList.class.getName());

            if (configs.isEmpty()) {
View Full Code Here

                // --override wasn't used (nothing explicit), see what was running before
                Set configLists = kernel.listGBeans(query);
                for (Iterator i = configLists.iterator(); i.hasNext();) {
                    ObjectName configListName = (ObjectName) i.next();
                    try {
                        configs.addAll((List) kernel.invoke(configListName, "restore"));
                    } catch (IOException e) {
                        System.err.println("Unable to restore last known configurations");
                        e.printStackTrace();
                        kernel.shutdown();
                        System.exit(1);
View Full Code Here

    }

    public void deployPlan(File moduleFile, File planFile) {
        try {
            Kernel kernel = KernelRegistry.getSingleKernel();
            List list = (List) kernel.invoke(ObjectNameConstants.DEPLOYER_OBJECT_NAME, DEPLOY_METHOD,
                    new Object[] {moduleFile, planFile}, DEPLOYER_ARGS);
            ConfigurationManager configurationManager = ConfigurationUtil
                    .getConfigurationManager(kernel);
            for (Iterator iterator = list.iterator(); iterator.hasNext();) {
                URI configID = URI.create((String)iterator.next());
View Full Code Here

        Kernel kernel = KernelFactory.newInstance().createKernel(getKernelName());
        kernel.boot();

        kernel.loadGBean(configuration, this.getClass().getClassLoader());
        kernel.startGBean(configName);
        kernel.invoke(configName, "loadGBeans", new Object[] {null}, new String[] {ManageableAttributeStore.class.getName()});
        kernel.invoke(configName, "startRecursiveGBeans");

        // load the rest of the configuration listed on the command line
        ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
        try {
View Full Code Here

        kernel.boot();

        kernel.loadGBean(configuration, this.getClass().getClassLoader());
        kernel.startGBean(configName);
        kernel.invoke(configName, "loadGBeans", new Object[] {null}, new String[] {ManageableAttributeStore.class.getName()});
        kernel.invoke(configName, "startRecursiveGBeans");

        // load the rest of the configuration listed on the command line
        ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
        try {
            for (Iterator i = configList.iterator(); i.hasNext();) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.