Package org.apache.geronimo.j2ee.j2eeobjectnames

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


        ObjectName containerName = locateComponentName(resourceLink, moduleURI, NameFactory.JCA_RESOURCE, NameFactory.JCA_RESOURCE_ADAPTER, j2eeContext, context, "resource adapter");
        return containerName.getCanonicalName();
    }

    public String getConnectionFactoryContainerId(URI moduleURI, String resourceLink, String type, NamingContext context) throws UnresolvedReferenceException {
        J2eeContext j2eeContext = context.getJ2eeContext();
        ObjectName containerName = locateComponentName(resourceLink, moduleURI, NameFactory.JCA_RESOURCE, type, j2eeContext, context, "connection factory");
        return containerName.getCanonicalName();
    }
View Full Code Here


        }
        return destination;
    }

    public String getAdminObjectContainerId(URI moduleURI, String resourceLink, NamingContext context) throws DeploymentException {
        J2eeContext j2eeContext = context.getJ2eeContext();
        ObjectName containerName = locateComponentName(resourceLink, moduleURI, NameFactory.JCA_RESOURCE, NameFactory.JCA_ADMIN_OBJECT, j2eeContext, context, "admin object");
        return containerName.getCanonicalName();
    }
View Full Code Here

        }
    }

    private GBeanData locateEjbInApplication(NamingContext namingContext, boolean isSession, String ejbLink, URI module) throws UnresolvedReferenceException {
        GBeanData gbeanData;
        J2eeContext j2eeContext = namingContext.getJ2eeContext();
        if (isSession) {
            gbeanData = locateComponentInApplication(ejbLink, module, NameFactory.EJB_MODULE, NameFactory.STATELESS_SESSION_BEAN, j2eeContext, "remote ejb", namingContext, false);
            if (gbeanData == null) {
                gbeanData = locateComponentInApplication(ejbLink, module, NameFactory.EJB_MODULE, NameFactory.STATEFUL_SESSION_BEAN, j2eeContext, "remote ejb", namingContext, true);
            }
View Full Code Here

        cmf.setAttribute("transactionSupport", NoTransactions.INSTANCE);
        cmf.setAttribute("pooling", new NoPool());
        cmf.setReferencePatterns("ConnectionTracker", Collections.singleton(ctcName));
        kernel.loadGBean(cmf, cl);

        J2eeContext j2eeContext = new J2eeContextImpl("test.domain", "geronimo", "testapplication", "noModuleType", "testmodule", TARGET_NAME, NameFactory.JCA_MANAGED_CONNECTION_FACTORY);
        managedConnectionFactoryName = NameFactory.getComponentName(null, null, null, NameFactory.JCA_RESOURCE, null, null, null, j2eeContext);

        GBeanData mcfw = new GBeanData(managedConnectionFactoryName, ManagedConnectionFactoryWrapperGBean.getGBeanInfo());
        mcfw.setAttribute("managedConnectionFactoryClass", MockManagedConnectionFactory.class.getName());
        mcfw.setAttribute("connectionFactoryInterface", ConnectionFactory.class.getName());
View Full Code Here

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

    protected void setUp() throws Exception {
        J2eeContext j2eeContext = new J2eeContextImpl("test.domain", "geronimo.server", "testapp", NameFactory.RESOURCE_ADAPTER_MODULE, "testmodule", TARGET_NAME, NameFactory.JMS_RESOURCE);
        kernel = KernelFactory.newInstance().createKernel(j2eeContext.getJ2eeDomainName());
        kernel.boot();
        selfName = NameFactory.getComponentName(null, null, null, NameFactory.JCA_RESOURCE, null, null, null, j2eeContext);

        GBeanData aow = new GBeanData(selfName, AdminObjectWrapperGBean.getGBeanInfo());
        aow.setAttribute("adminObjectInterface", MockAdminObject.class.getName());
View Full Code Here

        }

        DeploymentContext context = null;
        context = new DeploymentContext(outfile, configID, ConfigurationModuleType.SERVICE, parentID, domain, server, kernel);

        J2eeContext j2eeContext = new J2eeContextImpl(context.getDomain(), context.getServer(), NameFactory.NULL, NameFactory.J2EE_MODULE, configID.toString(), null, null);
        DependencyType[] includes = configType.getIncludeArray();
        addIncludes(context, includes, repository);
        addDependencies(context, configType.getDependencyArray(), repository);
        ClassLoader cl = context.getClassLoader(repository);
        GbeanType[] gbeans = configType.getGbeanArray();
View Full Code Here

    public void initContext(EARContext earContext, Module clientModule, ClassLoader cl) {
    }

    public void 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

        }

    }

    static void addEJBRefs(NamingContext earContext, NamingContext ejbContext, RefContext refContext, URI moduleURI, EjbRefType[] ejbRefs, Map ejbRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
        J2eeContext j2eeContext = ejbContext.getJ2eeContext();
        for (int i = 0; i < ejbRefs.length; i++) {
            EjbRefType ejbRef = ejbRefs[i];

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

            builder.bind(ejbRefName, ejbReference);
        }
    }

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

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

    public void processAction(ActionRequest actionRequest,
            ActionResponse actionResponse, ObjectName gbeanName)
            throws PortletException, IOException {
        if (!"detail".equals(actionRequest.getParameter("mode"))) {
            try {
                J2eeContext j2eeContext = J2eeContextImpl.newContext(gbeanName,
                        NameFactory.JCA_RESOURCE);
                ObjectName connectionManagerName = NameFactory
                        .getComponentName(null, null, null, null, null, null,
                                NameFactory.JCA_CONNECTION_MANAGER, j2eeContext);
                Integer newPartitionMaxSize = Integer.decode(actionRequest
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.