Package org.apache.geronimo.j2ee.j2eeobjectnames

Examples of org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext


        }
    }

    public static void addEJBLocalRefs(EARContext earContext, URI uri, EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
        RefContext refContext = earContext.getRefContext();
        J2eeContext j2eeContext = earContext.getJ2eeContext();
        for (int i = 0; i < ejbLocalRefs.length; i++) {
            EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];

            String ejbRefName = ejbLocalRef.getEjbRefName().getStringValue();
View Full Code Here


    }


    public static void setResourceEnvironment(EARContext earContext, URI uri, ResourceEnvironmentBuilder builder, ResourceRefType[] resourceRefs, GerResourceRefType[] gerResourceRefs) throws DeploymentException {
        RefContext refContext = earContext.getRefContext();
        J2eeContext j2eeContext = earContext.getJ2eeContext();
        Map refMap = mapResourceRefs(gerResourceRefs);
        Set unshareableResources = new HashSet();
        Set applicationManagedSecurityResources = new HashSet();
        for (int i = 0; i < resourceRefs.length; i++) {
            ResourceRefType resourceRefType = resourceRefs[i];
View Full Code Here

//        assertNotNull(o);
//        assertTrue(o instanceof MockAdminObject);
//    }

    protected void setUp() throws Exception {
        J2eeContext j2eeContext = new J2eeContextImpl("test.domain", "geronimo.server", "testapp", "testmodule", TARGET_NAME, NameFactory.JMS_RESOURCE);
        kernel = new Kernel(j2eeContext.getJ2eeServerName(), j2eeContext.getJ2eeDomainName());
        kernel.boot();
        selfName = NameFactory.getResourceComponentName(null, null, null, null, null, null, j2eeContext);

        GBeanMBean aow = new GBeanMBean(AdminObjectWrapper.getGBeanInfo());
        aow.setAttribute("adminObjectInterface", MockAdminObject.class);
View Full Code Here

//        assertNotNull(o);
//        assertTrue(o instanceof MockAdminObject);
//    }

    protected void setUp() throws Exception {
        J2eeContext j2eeContext = new J2eeContextImpl("test.domain", "geronimo.server", "testapp", "testmodule", TARGET_NAME, NameFactory.JMS_RESOURCE);
        kernel = new Kernel(j2eeContext.getJ2eeServerName(), j2eeContext.getJ2eeDomainName());
        kernel.boot();
        selfName = NameFactory.getResourceComponentName(null, null, null, null, null, null, j2eeContext);

        GBeanMBean aow = new GBeanMBean(AdminObjectWrapper.getGBeanInfo());
        aow.setAttribute("adminObjectInterface", MockAdminObject.class);
View Full Code Here

    private void executeTestBuildModule(InstallAction action) throws Exception {
//        String j2eeDomainName = "geronimo.server";
//        String j2eeServerName = "TestGeronimoServer";
//        String j2eeModuleName = "org/apache/geronimo/j2ee/deployment/test";
//        String j2eeApplicationName = "null";
        J2eeContext j2eeContext = new J2eeContextImpl("test.domain", "testServer", "null", "org/apache/geronimo/j2ee/deployment/test", null, null);
        ObjectName connectionTrackerName = new ObjectName("geronimo.connector:service=ConnectionTracker");

        Kernel kernel = new Kernel("testServer");
        ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, kernel);
        File rarFile = action.getRARFile();

        ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
        ClassLoader cl = new URLClassLoader(new URL[]{rarFile.toURL()}, oldCl);

        Thread.currentThread().setContextClassLoader(cl);

        JarFile rarJarFile = DeploymentUtil.createJarFile(rarFile);
        Module module = moduleBuilder.createModule(action.getVendorDD(), rarJarFile, j2eeContext.getJ2eeModuleName(), action.getSpecDD(), null);
        if (module == null) {
            throw new DeploymentException("Was not a connector module");
        }

        File tempDir = null;
        try {
            tempDir = DeploymentUtil.createTempDir();
            EARContext earContext = new EARContext(tempDir,
                    module.getConfigId(),
                    module.getType(),
                    module.getParentId(),
                    null,
                    j2eeContext.getJ2eeDomainName(),
                    j2eeContext.getJ2eeServerName(),
                    j2eeContext.getJ2eeApplicationName(),
                    null,
                    connectionTrackerName,
                    null,
                    null,
                    new RefContext(null, moduleBuilder));
View Full Code Here

            throw new DeploymentException("Problem deploying connector", e);
        }
    }

    public void initContext(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
        J2eeContext earJ2eeContext = earContext.getJ2eeContext();
        J2eeContext moduleJ2eeContext = new J2eeContextImpl(earJ2eeContext.getJ2eeDomainName(), earJ2eeContext.getJ2eeServerName(), earJ2eeContext.getJ2eeApplicationName(), module.getName(), null, null);
        XmlObject specDD = module.getSpecDD();
        GerConnectorType geronimoConnector = (GerConnectorType) module.getVendorDD();
        GerResourceadapterType[] geronimoResourceAdapters = geronimoConnector.getResourceadapterArray();
        for (int k = 0; k < geronimoResourceAdapters.length; k++) {
            GerResourceadapterType geronimoResourceAdapter = geronimoResourceAdapters[k];
View Full Code Here

        }

    }

    public String addGBeans(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
        J2eeContext earJ2eeContext = earContext.getJ2eeContext();
        J2eeContext moduleJ2eeContext = new J2eeContextImpl(earJ2eeContext.getJ2eeDomainName(), earJ2eeContext.getJ2eeServerName(), earJ2eeContext.getJ2eeApplicationName(), module.getName(), null, null);

        addResourceAdapterModuleGBean(earContext, moduleJ2eeContext, module.getOriginalSpecDD(), cl);

        GerConnectorType geronimoConnector = (GerConnectorType) module.getVendorDD();
View Full Code Here

        };
        executeTestBuildModule(action);
    }
   
    private void executeTestBuildModule(InstallAction action) throws Exception {
        J2eeContext j2eeContext = new J2eeContextImpl("test.domain", "testServer", "null", "org/apache/geronimo/j2ee/deployment/test", null, null);
//        String j2eeDomainName = "geronimo.server";
//        String j2eeServerName = "TestGeronimoServer";
//        String j2eeApplicationName = "null";
//        String j2eeModuleName = "org/apache/geronimo/j2ee/deployment/test";
        String resourceAdapterName = "testRA";
        ObjectName connectionTrackerName = new ObjectName("geronimo.connector:service=ConnectionTracker");

        Kernel kernel = new Kernel("testServer");
        ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, kernel);
        File rarFile = action.getRARFile();

        ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
        ClassLoader cl = new URLClassLoader(new URL[]{rarFile.toURL()}, oldCl);

        Thread.currentThread().setContextClassLoader(cl);

        Module module = moduleBuilder.createModule(null, DeploymentUtil.createJarFile(action.getRARFile()));
        assertEquals(j2eeContext.getJ2eeModuleName(), module.getConfigId().toString());

        File tempDir = null;
        try {
            tempDir = DeploymentUtil.createTempDir();
            EARContext earContext = new EARContext(tempDir,
                    module.getConfigId(),
                    module.getType(),
                    module.getParentId(),
                    null,
                    j2eeContext.getJ2eeDomainName(),
                    j2eeContext.getJ2eeServerName(),
                    j2eeContext.getJ2eeApplicationName(),
                    null,
                    connectionTrackerName,
                    null,
                    null,
                    new RefContext(null, null));
View Full Code Here

        };
        executeTestBuildModule(action);
    }
   
    private void executeTestBuildModule(InstallAction action) throws Exception {
        J2eeContext j2eeContext = new J2eeContextImpl("test.domain", "testServer", "null", "org/apache/geronimo/j2ee/deployment/test", null, null);
//        String j2eeDomainName = "geronimo.server";
//        String j2eeServerName = "TestGeronimoServer";
//        String j2eeApplicationName = "null";
//        String j2eeModuleName = "org/apache/geronimo/j2ee/deployment/test";
        String resourceAdapterName = "testRA";
        ObjectName connectionTrackerName = new ObjectName("geronimo.connector:service=ConnectionTracker");

        Kernel kernel = new Kernel("testServer");
        ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, kernel);
        File rarFile = action.getRARFile();

        ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
        ClassLoader cl = new URLClassLoader(new URL[]{rarFile.toURL()}, oldCl);

        Thread.currentThread().setContextClassLoader(cl);

        Module module = moduleBuilder.createModule(null, DeploymentUtil.createJarFile(action.getRARFile()));
        assertEquals(j2eeContext.getJ2eeModuleName(), module.getConfigId().toString());

        File tempDir = null;
        try {
            tempDir = DeploymentUtil.createTempDir();
            EARContext earContext = new EARContext(tempDir,
                    module.getConfigId(),
                    module.getType(),
                    module.getParentId(),
                    null,
                    j2eeContext.getJ2eeDomainName(),
                    j2eeContext.getJ2eeServerName(),
                    j2eeContext.getJ2eeApplicationName(),
                    null,
                    connectionTrackerName,
                    null,
                    null,
                    new RefContext(null, null));
View Full Code Here

    public void initContext(EARContext earContext, Module clientModule, ClassLoader cl) {
        // application clients do not add anything to the shared context
    }

    public String addGBeans(EARContext earContext, Module module, ClassLoader earClassLoader) throws DeploymentException {
        J2eeContext earJ2eeContext = earContext.getJ2eeContext();

        AppClientModule appClientModule = (AppClientModule) module;

        ApplicationClientType appClient = (ApplicationClientType) appClientModule.getSpecDD();
        GerApplicationClientType geronimoAppClient = (GerApplicationClientType) appClientModule.getVendorDD();
View Full Code Here

TOP

Related Classes of org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext

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.