Examples of ConnectorType


Examples of org.apache.geronimo.xbeans.j2ee.ConnectorType

    void addConnectorGBeans(DeploymentContext context, XmlObject genericConnectorDocument, GerConnectorType geronimoConnector, ClassLoader cl) throws DeploymentException {
        //addGBeans called from here so it is included in tests.
        addGBeans(geronimoConnector, cl, context);

        ConnectorType connector = ((ConnectorDocument) genericConnectorDocument).getConnector();
        ResourceadapterType resourceadapter = connector.getResourceadapter();
        GerResourceadapterType geronimoResourceAdapter = geronimoConnector.getResourceadapter();
        //ResourceAdapter setup
        String resourceAdapterClassName = resourceadapter.getResourceadapterClass().getStringValue();
        if (resourceAdapterClassName == null) {
            throw new DeploymentException("No resource adapter class provided for J2ee Connector Architecture 1.5 adapter");
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorType

    }

    public void initContext(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
        ConnectorModule resourceModule = (ConnectorModule) module;

        final ConnectorType connector = (ConnectorType) module.getSpecDD();

        /*
        The chain of idiotic jsr-77 meaningless objects is:
        ResourceAdapterModule (1)  >
        ResourceAdapter (n, but there can only be 1 resource adapter in a rar, so we use 1) >
        JCAResource (1) >
        JCAConnectionFactory (n) >
        JCAManagedConnectionFactory (1)
        We also include:
        JCAResourceAdapter (n)  (from JCAResource) (actual instance of ResourceAdapter)
        TODO include admin objects (n) from JCAResource presumably
        */
        AbstractName resourceAdapterModuleName = resourceModule.getModuleName();

        AbstractName resourceAdapterjsr77Name = earContext.getNaming().createChildName(resourceAdapterModuleName, module.getName(), NameFactory.RESOURCE_ADAPTER);
        AbstractName jcaResourcejsr77Name = earContext.getNaming().createChildName(resourceAdapterjsr77Name, module.getName(), NameFactory.JCA_RESOURCE);

        //set up the metadata for the ResourceAdapterModule
        GBeanData resourceAdapterModuleData = new GBeanData(resourceAdapterModuleName, ResourceAdapterModuleImplGBean.GBEAN_INFO);
        // initalize the GBean
        if (earContext.getServerName() != null) {
            //app clients don't have a Server gbean
            resourceAdapterModuleData.setReferencePattern(NameFactory.J2EE_SERVER, earContext.getServerName());
            //app clients don't have an application name either
            if (!earContext.getModuleName().equals(resourceAdapterModuleName)) {
                resourceAdapterModuleData.setReferencePattern(NameFactory.J2EE_APPLICATION, earContext.getModuleName());
            }
        }
        resourceAdapterModuleData.setReferencePattern("ResourceAdapter", resourceAdapterjsr77Name);

        resourceAdapterModuleData.setAttribute("deploymentDescriptor", module.getOriginalSpecDD());
        resourceAdapterModuleData.setAttribute("displayName", connector.getDisplayNameArray().length == 0 ? null : connector.getDisplayNameArray(0).getStringValue());
        resourceAdapterModuleData.setAttribute("description", connector.getDescriptionArray().length == 0 ? null : connector.getDescriptionArray(0).getStringValue());
        resourceAdapterModuleData.setAttribute("vendorName", connector.getVendorName().getStringValue());
        resourceAdapterModuleData.setAttribute("EISType", connector.getEisType().getStringValue());
        resourceAdapterModuleData.setAttribute("resourceAdapterVersion", connector.getResourceadapterVersion().getStringValue());

        ResourceadapterType resourceadapter = connector.getResourceadapter();
        // Create the resource adapter gbean
        if (resourceadapter.isSetResourceadapterClass()) {
            GBeanInfoBuilder resourceAdapterInfoBuilder = new GBeanInfoBuilder(ResourceAdapterWrapperGBean.class, ResourceAdapterWrapperGBean.GBEAN_INFO);
            String resourceAdapterClassName = resourceadapter.getResourceadapterClass().getStringValue().trim();
            GBeanData resourceAdapterGBeanData = setUpDynamicGBeanWithProperties(resourceAdapterClassName, resourceAdapterInfoBuilder, resourceadapter.getConfigPropertyArray(), cl, Collections.<String>emptySet());
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorType

    public void initContext(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
        J2eeContext earJ2eeContext = earContext.getJ2eeContext();
        J2eeContext moduleJ2eeContext = J2eeContextImpl.newModuleContextFromApplication(earJ2eeContext, NameFactory.RESOURCE_ADAPTER_MODULE, module.getName());
        J2eeContext resourceJ2eeContext = J2eeContextImpl.newModuleContextFromApplication(earJ2eeContext, NameFactory.JCA_RESOURCE, module.getName());
        final ConnectorType connector = (ConnectorType) module.getSpecDD();

        //set up the metadata for the ResourceAdapterModule
        ObjectName resourceAdapterModuleName = null;
        try {
            resourceAdapterModuleName = NameFactory.getModuleName(null, null, null, null, null, moduleJ2eeContext);
        } catch (MalformedObjectNameException e) {
            throw new DeploymentException("Could not construct module name", e);
        }
        GBeanData resourceAdapterModuleData = new GBeanData(resourceAdapterModuleName, ResourceAdapterModuleImplGBean.GBEAN_INFO);

        // initalize the GBean
        resourceAdapterModuleData.setReferencePattern(NameFactory.J2EE_SERVER, earContext.getServerObjectName());
        if (!earContext.getJ2EEApplicationName().equals(NameFactory.NULL)) {
            resourceAdapterModuleData.setReferencePattern(NameFactory.J2EE_APPLICATION, earContext.getApplicationObjectName());
        }

        resourceAdapterModuleData.setAttribute("deploymentDescriptor", module.getOriginalSpecDD());
        resourceAdapterModuleData.setAttribute("displayName", connector.getDisplayNameArray().length == 0 ? null : connector.getDisplayNameArray(0).getStringValue());
        resourceAdapterModuleData.setAttribute("description", connector.getDescriptionArray().length == 0 ? null : connector.getDescriptionArray(0).getStringValue());
        resourceAdapterModuleData.setAttribute("vendorName", connector.getVendorName().getStringValue());
        resourceAdapterModuleData.setAttribute("EISType", connector.getEisType().getStringValue());
        resourceAdapterModuleData.setAttribute("resourceAdapterVersion", connector.getResourceadapterVersion().getStringValue());

        ResourceadapterType resourceadapter = connector.getResourceadapter();
        // Create the resource adapter gbean
        if (resourceadapter.isSetResourceadapterClass()) {
            GBeanInfoBuilder resourceAdapterInfoBuilder = new GBeanInfoBuilder(ResourceAdapterWrapperGBean.class, ResourceAdapterWrapperGBean.GBEAN_INFO);
            GBeanData resourceAdapterGBeanData = setUpDynamicGBean(resourceAdapterInfoBuilder, resourceadapter.getConfigPropertyArray(), cl);
View Full Code Here

Examples of org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType

                    environment = plan.getEnvironment();
            }
        }
        else if (GeronimoUtils.isRARModule(module)) {
            if (getConnectorDeploymentPlan(module) != null) {
                ConnectorType plan = getConnectorDeploymentPlan(module).getValue();
                if (plan != null)
                    environment = plan.getEnvironment();
            }
        }else if (GeronimoUtils.isAppClientModule(module)) {
            if (getAppClientDeploymentPlan(module) != null) {
                ApplicationClientType plan = getAppClientDeploymentPlan(module).getValue();
                if (plan != null)
                    environment = plan.getServerEnvironment();
            }
        }

        Trace.tracePoint("Exit ", "DependencyHelper.getEnvironment", environment);
        return environment;
View Full Code Here

Examples of org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType

    } else if (isEarModule(module)) {
      ApplicationType plan = getApplicationDeploymentPlan(module).getValue();
      if (plan != null)
        environment = plan.getEnvironment();
    } else if (isRARModule(module)) {
      ConnectorType plan = getConnectorDeploymentPlan(module).getValue();
      if (plan != null)
        environment = plan.getEnvironment();
    }
    if (environment != null
              && environment.getModuleId() != null) {
              Trace.tracePoint("EXIT", "GeronimoV11Utils.getConfigId", getQualifiedConfigID(environment.getModuleId()));
              return getQualifiedConfigID(environment.getModuleId());
View Full Code Here

Examples of org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType

          ApplicationType application = (ApplicationType)((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan().getValue();
            managedForm.addPart(new ModuleSection(getDeploymentPlan(), body, toolkit, getStyle(), application.getModule()));
            managedForm.addPart(new ExtModuleSection(getDeploymentPlan(), body, toolkit, getStyle(), application.getExtModule()));
        }
        if (ConnectorType.class.isInstance(getDeploymentPlan().getValue())) {
          ConnectorType connector = (ConnectorType)((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan().getValue();
            managedForm.addPart(new AdminObjectSection(getDeploymentPlan(), body, toolkit, getStyle(), connector.getAdminobject()));
        }
        if (ApplicationClientType.class.isInstance(getDeploymentPlan().getValue())) {
            managedForm.addPart(new DependencySection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false));
            managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false, true));
            managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false, false));
View Full Code Here

Examples of org.mokai.type.ConnectorType

    TypeLoader typeLoader = new PluginTypeLoader(mockPluginMechanism());

    Set<ConnectorType> processorTypes = typeLoader.loadConnectorTypes();
    Assert.assertEquals(processorTypes.size(), 1);

    ConnectorType processorType = processorTypes.iterator().next();
    Assert.assertNotNull(processorType);
    Assert.assertEquals(processorType.getName(), "");
    Assert.assertEquals(processorType.getDescription(), "");
    Assert.assertEquals(processorType.getConnectorClass(), MockConnector.class);
  }
View Full Code Here

Examples of org.mokai.type.ConnectorType

    StandardTypeLoader typeLoader = new StandardTypeLoader();

    Set<ConnectorType> connectorTypes = typeLoader.loadConnectorTypes();
    Assert.assertTrue(connectorTypes.size() > 0);

    ConnectorType test = new ConnectorType("", "", MockConnector.class);
    Assert.assertTrue(connectorTypes.contains(test));
  }
View Full Code Here

Examples of org.mokai.type.ConnectorType

  public final Set<ConnectorType> loadConnectorTypes() {
    Set<ConnectorType> processorTypes = new HashSet<ConnectorType>();

    Set<Class<? extends Connector>> connectorClasses = pluginMechanism.loadTypes(Connector.class);
    for (Class<? extends Connector> connectorClass : connectorClasses) {
      ConnectorType connectorType = TypeBuilder.buildConnectorType(connectorClass);
      processorTypes.add(connectorType);
    }

    return processorTypes;
  }
View Full Code Here

Examples of org.mokai.type.ConnectorType

    ServiceLoader<Connector> serviceLoader = ServiceLoader.load(Connector.class);

    for (Connector connector : serviceLoader) {
      Class<? extends Connector> connectorClass = connector.getClass();
      ConnectorType processorType = TypeBuilder.buildConnectorType(connectorClass);
      processorTypes.add(processorType);
    }

    return processorTypes;
  }
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.