Package org.apache.geronimo.kernel

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


    }

    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


                // --override wasn't used (nothing explicit), see what was running before
                Set configLists = kernel.listGBeans(query);
                for (Iterator i = configLists.iterator(); i.hasNext();) {
                    AbstractName configListName = (AbstractName) 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

     * @throws ObjectStreamException
     */
    private Object readResolve() throws ObjectStreamException {
        Kernel kernel = Kernel.getKernel(kernelName);
        try {
            return kernel.invoke(targetName, "$getMethodInterceptor");
        } catch (Exception e) {
            throw (InvalidObjectException)new InvalidObjectException("could not get method interceptor from ManagedConnectionFactoryWrapper").initCause(e);
        }
    }

View Full Code Here

            throw (IllegalArgumentException) new IllegalArgumentException("Invalid object name in jmxRefAddr: " + getContainerId()).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 " + getContainerId() + " not started");
View Full Code Here

                // nothing explicit, see what was running before
                Set configLists = kernel.listGBeans(JMXUtil.getObjectName("*:role=PersistentConfigurationList,*"));
                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(3);
View Full Code Here

        }
        AbstractNameQuery anq= new AbstractNameQuery("org.apache.geronimo.management.geronimo.KeystoreManager");
        Set<AbstractName> it=kernel.listGBeans(anq);
        AbstractName an = (AbstractName) it.iterator().next();
        try {
            kernel.invoke(an, "initializeKeystores");
        } catch (GBeanNotFoundException e1) {
            throw new DeploymentException("Unable to find the gbean associated with initializeKeystores");
        } catch (NoSuchOperationException e1) {
            throw new DeploymentException("Operation initializeKeystores does not exist");
        } catch (InternalKernelException e1) {
View Full Code Here

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

    }

    private Object readResolve() throws ObjectStreamException {
        Kernel kernel = Kernel.getKernel(kernelName);
        try {
            return kernel.invoke(targetName, "getMethodInterceptor");
        } catch (Exception e) {
            throw (InvalidObjectException)new InvalidObjectException("could not get method interceptor from ManagedConnectionFactoryWrapper").initCause(e);
        }
    }
View Full Code Here

                ObjectName configurationName = configurationManager.load(configurationID);
                kernel.startRecursiveGBean(configurationName);
            }

            // invoke the main method
            kernel.invoke(
                    manifest.getMainGBean(),
                    manifest.getMainMethod(),
                    new Object[]{args},
                    new String[]{String[].class.getName()});
View Full Code Here

     * @throws ObjectStreamException
     */
    private Object readResolve() throws ObjectStreamException {
        Kernel kernel = Kernel.getKernel(kernelName);
        try {
            return kernel.invoke(targetName, "getMethodInterceptor");
        } catch (Exception e) {
            throw (InvalidObjectException)new InvalidObjectException("could not get method interceptor from ManagedConnectionFactoryWrapper").initCause(e);
        }
    }

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.