Package org.apache.geronimo.kernel.osgi

Examples of org.apache.geronimo.kernel.osgi.MockBundle


            return;
        }

        String tmpDir = System.getProperty("java.io.tmpdir");
        ServerInfo serverInfo = new BasicServerInfo(tmpDir);
        Bundle bundle = new MockBundle(getClass().getClassLoader(), "", 0);
        ORBConfigAdapter adapter = new ORBConfigAdapter(bundle);
        // make sure all system properties are initialized.
        nameService = new NameService(serverInfo, adapter, "localhost", 8050);
        nameService.doStart();
View Full Code Here


                assertSame(masterId, configurationData.getId());
                assertSame(masterDir, configurationData.getConfigurationDir());

                List<GBeanData> gbeans;
                try {
                    gbeans = configurationData.getGBeans(new MockBundle(getClass().getClassLoader(), "", 0L));
                } catch (InvalidConfigException e) {
                    throw new AssertionFailedError();
                }
                assertEquals(1, gbeans.size());
                GBeanData gbean = gbeans.get(0);
View Full Code Here

        this.corbaGBeanObjectName = corbaGBeanObjectName;
        this.messageDestinations = messageDestinations;
        }
         */
        public DummyEARContext() throws Exception {
            super(FileUtils.createTempDir(), null, new Environment(), ConfigurationModuleType.WAR, null, new DummyConfigurationManager(), new MockBundleContext(new MockBundle(WebFragmentTest.class
                    .getClassLoader(), "", 1L)), null, null, null, null, null, null);
        }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        URL warDir = classLoader.getResource("deployables/war1/");
        ClassLoader cl = new URLClassLoader(new URL[] {warDir});
        Bundle bundle = new MockBundle(cl, warDir.toString(), 0L);
        deployable = new WebDeployable(bundle);
        config = new WARConfiguration(deployable);

        ddBeanRoot = deployable.getDDBeanRoot();
        configRoot = (WebAppDConfigRoot) config.getDConfigBeanRoot(ddBeanRoot);
View Full Code Here

*/
public class Connector15DCBTest extends TestCase {
    private ClassLoader classLoader;

    public void testCreateDatabase() throws Exception {
        Bundle bundle = new MockBundle(classLoader, "", 0L);
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("database.rar");
        assertNotNull(resource);
        ConnectorDeployable deployable = new ConnectorDeployable(bundle);
        assertEquals(ModuleType.RAR, deployable.getType());
View Full Code Here

    }

    public void testWriteWithNulls() throws Exception {
        InputStream in = classLoader.getResource("plan-with-nulls.xml").openStream();

        Bundle bundle = new MockBundle(classLoader, "", 0L);
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("database.rar");
        assertNotNull(resource);
        ConnectorDeployable deployable = new ConnectorDeployable(bundle);
        assertEquals(ModuleType.RAR, deployable.getType());
View Full Code Here

    public void testCreateJMSResource() throws Exception {
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("jms.rar");
        assertNotNull(resource);
        Bundle bundle = new MockBundle(classLoader, "", 0L);
        ConnectorDeployable deployable = new ConnectorDeployable(bundle);
        assertEquals(ModuleType.RAR, deployable.getType());
        Set entrySet = new HashSet(Collections.list(deployable.entries()));
        assertTrue(entrySet.contains("META-INF/ra.xml"));
        assertTrue(entrySet.contains("activemq-ra-3.2.1.jar"));
View Full Code Here

    public void testLoadJMSResources() throws Exception {
        InputStream in = classLoader.getResource("jms-plan.xml").openStream();
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("jms.rar");
        assertNotNull(resource);
        Bundle bundle = new MockBundle(classLoader, "", 0L);
        ConnectorDeployable deployable = new ConnectorDeployable(bundle);
        assertEquals(ModuleType.RAR, deployable.getType());
        Set entrySet = new HashSet(Collections.list(deployable.entries()));
        assertTrue(entrySet.contains("META-INF/ra.xml"));
        assertTrue(entrySet.contains("activemq-ra-3.2.1.jar"));
View Full Code Here

/**
* @version $Rev: 831403 $ $Date: 2009-10-30 13:57:04 -0400 (Fri, 30 Oct 2009) $
*/
public class GBeanTest extends TestCase {
    public void testOpenEjbSystemGBean() {
        GBeanInfo.getGBeanInfo(OpenEjbSystemGBean.class.getName(), new MockBundle(getClass().getClassLoader(), "test", 0L));
    }
View Full Code Here

    public void testOpenEjbSystemGBean() {
        GBeanInfo.getGBeanInfo(OpenEjbSystemGBean.class.getName(), new MockBundle(getClass().getClassLoader(), "test", 0L));
    }

    public void testEjbModuleImplGBean() {
        GBeanInfo.getGBeanInfo(EjbModuleImplGBean.class.getName(), new MockBundle(getClass().getClassLoader(), "test", 0L));
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.osgi.MockBundle

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.