Package org.apache.geronimo.kernel

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


                    logger.warn("PhysicalName undefined, using queueName as PhysicalName");
                    currentPhysicalName = queueName;
                }
                if (targetPhysicalName.equals(currentPhysicalName)) {
                    AbstractName absName = kernel.getAbstractNameFor(bean);
                    dest = (Destination) kernel.invoke(absName, "$getResource");
                    return dest;
                }
            }
        } catch (Exception ex) {
            logger.error("Failed to get destination", ex);
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

        File repoFile = null;

        try {
            Kernel kernel = KernelRegistry.getSingleKernel();
            URI uri = new URI(".");
            URL rootURL = (URL) kernel.invoke(REPO_NAME, GETURL_METHOD,
                    new Object[] { uri }, REPO_ARGS);
            uri = new URI(rootURL.toString());
            repoFile = new File(uri);
        } catch (URISyntaxException e) {
            System.out.println("ERROR: Invalid repository URL");
View Full Code Here

    }

    public void deployPlan(File moduleFile, File planFile) {
        try {
            Kernel kernel = KernelRegistry.getSingleKernel();
            List list = (List) kernel.invoke(DEPLOYER_NAME, DEPLOY_METHOD,
                    new Object[] { moduleFile, planFile }, DEPLOYER_ARGS);
            System.out.println("Deployed: " + moduleFile + " : " + planFile);
            ConfigurationManager configurationManager = ConfigurationUtil
                    .getConfigurationManager(kernel);
            // start installed app/s
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

            throw (NameNotFoundException) new NameNotFoundException("Could not resolve name query: " + abstractNameQueries).initCause(e);
        }

        Object proxy;
        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 " + target + " not started");
View Full Code Here

        throw (NameNotFoundException) new NameNotFoundException("Could not resolve name query: " + abstractNameQueries).initCause(e);
    }

    Object entityManager;
    try {
        entityManager = kernel.invoke(target, "getEntityManager", new Object[] {Boolean.valueOf(transactionScoped), properties}, new String[] {boolean.class.getName(), Map.class.getName()});
    } catch (Exception e) {
        throw (IllegalStateException) new IllegalStateException("Could not get entityManager").initCause(e);
    }
    if (entityManager == null) {
        throw new IllegalStateException("entity manager not returned. Target " + target + " not started");
View Full Code Here

            throw (NameNotFoundException) new NameNotFoundException("Could not resolve name query: " + abstractNameQueries).initCause(e);
        }

        Object proxy;
        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 " + target + " not started");
View Full Code Here

        throw (NameNotFoundException) new NameNotFoundException("Could not resolve name query: " + abstractNameQueries).initCause(e);
    }

    Object entityManager;
    try {
        entityManager = kernel.invoke(target, "getEntityManager", new Object[] {Boolean.valueOf(transactionScoped), properties}, new String[] {boolean.class.getName(), Map.class.getName()});
    } catch (Exception e) {
        throw (IllegalStateException) new IllegalStateException("Could not get entityManager").initCause(e);
    }
    if (entityManager == null) {
        throw new IllegalStateException("entity manager not returned. Target " + target + " not started");
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.