Package org.apache.geronimo.kernel.osgi

Examples of org.apache.geronimo.kernel.osgi.MockBundleContext$MockServiceReference


        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


        return new AbstractName(new Artifact("test", "foo", "1", "car"), names, objectName);
    }

    protected void setUp() throws Exception {
        super.setUp();
        BundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", new HashMap<Artifact, ConfigurationData>(), null);
        kernel = KernelFactory.newInstance(bundleContext).createKernel(DOMAIN);
        kernel.boot();

        // server info
        SERVER_INFO_DATA.setAttribute("baseDirectory", System.getProperty("java.io.tmpdir"));
View Full Code Here

        XmlCursor cursor = xmlObject.newCursor();
        cursor.toFirstContentToken();
        xmlObject = cursor.getObject();
        HashMap<String, Artifact> locations = new HashMap<String, Artifact>();
        locations.put(null, Artifact.create("test/foo/1.0/car"));
        BundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", new HashMap<Artifact, ConfigurationData>(), locations);
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1.0/car")), null, ConfigurationModuleType.SERVICE, new Jsr77Naming(), new MockConfigurationManager(), Collections.<Repository>emptySet(), bundleContext);
        context.initializeConfiguration();
        AbstractName parentName = new AbstractName(URI.create("test/foo/1.0/car?name=parent,j2eeType=foo"));
        builder.getReferences(xmlObject, context, parentName, bundleContext.getBundle());
        secBuilder.doStop();
    }
View Full Code Here

        assertSame(cm, cm2);
    }

    protected void setUp() throws Exception {
        super.setUp();
        BundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", null, null);
        kernel = KernelFactory.newInstance(bundleContext).createKernel(KERNEL_NAME);
        kernel.boot();
        ClassLoader cl = MockConnectionTrackingCoordinator.class.getClassLoader();

        GBeanData ctc = buildGBeanData("name", "ConnectionTrackingCoordinator", MockConnectionTrackingCoordinator.class);
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        Artifact artifact = new Artifact("foo", "bar", "1.0", "car");
        Map<String, Artifact> locations = new HashMap<String, Artifact>();
        locations.put(null, artifact);
        bundleContext = new MockBundleContext(getClass().getClassLoader(), "", null, locations);
        PackageAdmin packageAdmin = new PackageAdmin() {

                @Override
                public ExportedPackage[] getExportedPackages(Bundle bundle) {
                    return new ExportedPackage[0];
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        Artifact artifact = new Artifact("foo", "bar", "1.0", "car");
        Map<String, Artifact> locations = new HashMap<String, Artifact>();
        locations.put(null, artifact);
        BundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", null, locations);
        Artifact id = new Artifact("test", "test", "", "car");
        module  = new ConnectorModule(false, new AbstractName(id, Collections.singletonMap("name", "test")), null, null, null, "foo", null, null, null, null);
        ConfigurationManager configurationManager = new MockConfigurationManager();
        EARContext earContext = new EARContext(new File("foo"),
            null,
View Full Code Here

    private Bundle bundle;

    protected TomcatWebAppContext setUpInsecureAppContext(String relativeWebAppRoot, URL configurationBaseURL, SecurityHolder securityHolder, RunAsSource runAsSource, ObjectRetriever tomcatRealm, ValveGBean valveChain) throws Exception {
        configurationBaseURL = cl.getResource("deployables/");
        URI locationURI = configurationBaseURL.toURI().resolve(relativeWebAppRoot);
        MockBundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), locationURI.toString(), new HashMap<Artifact, ConfigurationData>(), null);
        bundle = bundleContext.getBundle();
        ContextSource contextSource = new WebContextSource(Collections.<String, Object>emptyMap(),
                Collections.<String, Object>emptyMap(),
                transactionManager,
                null,
                cl,
View Full Code Here

        JaasLoginModuleUse loginModuleUse = new JaasLoginModuleUse(loginModule, null, LoginModuleControlFlag.REQUIRED);

        PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
        principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
        Bundle bundle = new MockBundle(cl, "", -1);
        ProxyLoginModule.init(new MockBundleContext(bundle));
        realm = new GenericSecurityRealm(domainName, loginModuleUse, true, true, serverInfo, bundle, null);
    }
View Full Code Here

                null,
                null);
        engine.doStart();

        ServerInfo serverInfo = new BasicServerInfo(".");
        MockBundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", new HashMap<Artifact, ConfigurationData>(), null);
        container = new TomcatContainer(cl,
                bundleContext,
            new File(BASEDIR, "target/var/catalina").toString(), null, null, null, engine, null, serverInfo, null, null);
        container.doStart();
View Full Code Here

    }

    protected void setUp() throws Exception {
        super.setUp();
        J2eeContext j2eeContext = new J2eeContextImpl("test.domain", "geronimo.server", "testapp", NameFactory.RESOURCE_ADAPTER_MODULE, "testmodule", TARGET_NAME, NameFactory.JMS_RESOURCE);
        BundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", null, null);
        kernel = KernelFactory.newInstance(bundleContext).createKernel(j2eeContext.getJ2eeDomainName());
        kernel.boot();

        GBeanData aow = buildGBeanData("name", TARGET_NAME, AdminObjectWrapperGBean.getGBeanInfo());
        selfName = aow.getAbstractName();
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.osgi.MockBundleContext$MockServiceReference

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.