Package org.apache.geronimo.kernel

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


public class MBeanServerEndPointImplTest extends TestCase
{

    public void testMBeanServerType() throws Exception {
        Kernel kernel = new Kernel();
        kernel.boot();
        MBeanServerEndPointImpl serverEndPoint =
            new MBeanServerEndPointImpl(new MockNode(), "", kernel);
        MBeanServer server = serverEndPoint.getMBeanServer();
        assertTrue(server instanceof Referenceable);
    }
View Full Code Here


    }
   
    public void testInvoke() throws Exception {
        String kernelName = "theName";
        Kernel kernel = new Kernel(kernelName, "geronimo.test");
        kernel.boot();
        MBeanServerEndPointImpl serverEndPoint =
        new MBeanServerEndPointImpl(new MockNode(), "", kernel);
        MBeanServer server = serverEndPoint.getMBeanServer();
        assertTrue(server instanceof Referenceable);
        assertEquals(kernelName, server.getAttribute(Kernel.KERNEL, "KernelName"));
View Full Code Here

        Kernel kernel = null;
        try {
            GBeanMBean config = loadConfig(unpackedDir);

            kernel = new Kernel("blah");
            kernel.boot();

            GBeanMBean serverInfoGBean = new GBeanMBean(ServerInfo.GBEAN_INFO);
            serverInfoGBean.setAttribute("baseDirectory", ".");
            ObjectName serverInfoObjectName = ObjectName.getInstance(j2eeDomainName + ":type=ServerInfo");
            kernel.loadGBean(serverInfoObjectName, serverInfoGBean);
View Full Code Here

            }

        });
        ReadOnlyContext roc = builder.getContext();
        Kernel kernel = new Kernel("test.kernel", "test.domain");
        kernel.boot();
        try {
            assertEquals(kernel, Kernel.getKernel("test.kernel"));
            ObjectName proxyFactoryName = ObjectName.getInstance(JMXReferenceFactory.BASE_ADMIN_OBJECT_NAME + "testAdminObject");
            GBeanMBean gbean = new GBeanMBean(getGbeanInfo());
            gbean.setAttribute("Content", proxy);
View Full Code Here

        Kernel kernel = null;
        try {
            GBeanMBean config = loadConfig(unpackedDir);

            kernel = new Kernel("blah");
            kernel.boot();

            GBeanMBean serverInfoGBean = new GBeanMBean(ServerInfo.GBEAN_INFO);
            serverInfoGBean.setAttribute("baseDirectory", ".");
            ObjectName serverInfoObjectName = ObjectName.getInstance(j2eeDomainName + ":type=ServerInfo");
            kernel.loadGBean(serverInfoObjectName, serverInfoGBean);
View Full Code Here

            ois.close();
        }

        // build a basic kernel without a configuration-store, our configuration store is
        Kernel kernel = new Kernel(getKernelName(), getDomainName());
        kernel.boot();

        ConfigurationManager configurationManager = kernel.getConfigurationManager();
        ObjectName configName = configurationManager.load(configuration, systemURL);
        kernel.startRecursiveGBean(configName);
View Full Code Here

        proxy = new ArrayList();
//        builder.addResourceEnvRef("resourceenvref", List.class, localRef);

        Context context = EnterpriseNamingContext.createEnterpriseNamingContext(builder.getContext());
        Kernel kernel = KernelFactory.newInstance().createKernel("test.kernel");
        kernel.boot();
        try {
            assertEquals(kernel, KernelRegistry.getKernel("test.kernel"));
            ObjectName proxyFactoryName = null;//referenceFactory.createAdminObjectObjectName("testAdminObject");
            GBeanData gbean = new GBeanData(proxyFactoryName, getGbeanInfo());
            gbean.setAttribute("Content", proxy);
View Full Code Here

        File geronimoBaseDir = new File(args[0]);
        System.setProperty("org.apache.geronimo.base.dir", geronimoBaseDir.getAbsolutePath());

        // create the kernel
        Kernel kernel = KernelFactory.newInstance().createKernel("geronimo");
        kernel.boot();

        PrintWriter out = new PrintWriter(System.out, true);
        try {
            ObjectName serverInfoName = new ObjectName("configdump:name=ServerInfo");
            GBeanData serverInfoData = new GBeanData(serverInfoName, BasicServerInfo.GBEAN_INFO);
View Full Code Here

            // create the kernel
            final Kernel kernel = KernelFactory.newInstance().createKernel("geronimo");

            // boot the kernel
            try {
                kernel.boot();
            } catch (Exception e) {
                e.printStackTrace();
                System.exit(1);
                throw new AssertionError();
            }
View Full Code Here

    private File kernelState;

    public void testCreate() throws Exception {
        Kernel kernel = KernelFactory.newInstance().createKernel("test.kernel");
        assertEquals("No kernel should be registered", null, KernelRegistry.getKernel("test.kernel"));
        kernel.boot();
        assertEquals("test.kernel kernel should be registered", kernel, KernelRegistry.getKernel("test.kernel"));
        kernel.shutdown();
        assertEquals("No kernel should be registered", null, KernelRegistry.getKernel("test.kernel"));
    }
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.