Package org.apache.openejb.jee

Examples of org.apache.openejb.jee.OutboundResourceAdapter$JAXB


    }

    private void processConnectionDescription(ResourceAdapter resourceAdapter, ConnectionDefinition connectionDefinitionAnnotation, Class<?> cls) {
      // try and find the managed connection factory

      OutboundResourceAdapter outboundResourceAdapter = resourceAdapter.getOutboundResourceAdapter();
      if (outboundResourceAdapter == null) {
        outboundResourceAdapter = new OutboundResourceAdapter();
        resourceAdapter.setOutboundResourceAdapter(outboundResourceAdapter);
      }

      List<org.apache.openejb.jee.ConnectionDefinition> connectionDefinition = outboundResourceAdapter.getConnectionDefinition();

      org.apache.openejb.jee.ConnectionDefinition definition = null;
      for (org.apache.openejb.jee.ConnectionDefinition cd : connectionDefinition) {
        if (cd.getManagedConnectionFactoryClass().equals(cls.getName())) {
          definition = cd;
          break;
        }
      }

      if (definition == null) {
        definition = new org.apache.openejb.jee.ConnectionDefinition();
        outboundResourceAdapter.getConnectionDefinition().add(definition);
      }

      if (definition.getManagedConnectionFactoryClass() == null) {
        definition.setManagedConnectionFactoryClass(cls.getName());
      }
View Full Code Here


                    }
                }
                connectorInfo.resourceAdapter = configFactory.configureService(resource, ResourceInfo.class);
            }

            OutboundResourceAdapter outbound = resourceAdapter.getOutboundResourceAdapter();
            if (outbound != null) {
                String transactionSupport = "none";
                switch (outbound.getTransactionSupport()) {
                    case LOCAL_TRANSACTION:
                        transactionSupport = "local";
                        break;
                    case NO_TRANSACTION:
                        transactionSupport = "none";
                        break;
                    case XA_TRANSACTION:
                        transactionSupport = "xa";
                        break;
                }
                for (ConnectionDefinition connection : outbound.getConnectionDefinition()) {

                    String id = getId(connection, outbound, connectorModule);
                    String className = connection.getManagedConnectionFactoryClass();
                    String type = connection.getConnectionFactoryInterface();
View Full Code Here

                    }
                }
                connectorInfo.resourceAdapter = configFactory.configureService(resource, ResourceInfo.class);
            }

            OutboundResourceAdapter outbound = resourceAdapter.getOutboundResourceAdapter();
            if (outbound != null) {
                String transactionSupport = "none";
                switch (outbound.getTransactionSupport()) {
                    case LOCAL_TRANSACTION:
                        transactionSupport = "local";
                        break;
                    case NO_TRANSACTION:
                        transactionSupport = "none";
                        break;
                    case XA_TRANSACTION:
                        transactionSupport = "xa";
                        break;
                }
                for (ConnectionDefinition connection : outbound.getConnectionDefinition()) {

                    String id = getId(connection, outbound, connectorModule);
                    String className = connection.getManagedConnectionFactoryClass();
                    String type = connection.getConnectionFactoryInterface();
View Full Code Here

                        resourceAdapterId = connectorModule.getModuleId() + "RA";
                    }
                    resourceAdapterIds.add(resourceAdapterId);
                }

                OutboundResourceAdapter outbound = resourceAdapter.getOutboundResourceAdapter();
                if (outbound != null) {
                    for (ConnectionDefinition connection : outbound.getConnectionDefinition()) {
                        String type = connection.getConnectionFactoryInterface();

                        String resourceId;
                        if (connection.getId() != null) {
                            resourceId = connection.getId();
                        } else if (outbound.getConnectionDefinition().size() == 1) {
                            resourceId = connectorModule.getModuleId();
                        } else {
                            resourceId = connectorModule.getModuleId() + "-" + type;
                        }
View Full Code Here

    }

    private void processConnectionDescription(ResourceAdapter resourceAdapter, ConnectionDefinition connectionDefinitionAnnotation, Class<?> cls) {
      // try and find the managed connection factory

      OutboundResourceAdapter outboundResourceAdapter = resourceAdapter.getOutboundResourceAdapter();
      if (outboundResourceAdapter == null) {
        outboundResourceAdapter = new OutboundResourceAdapter();
        resourceAdapter.setOutboundResourceAdapter(outboundResourceAdapter);
      }

      List<org.apache.openejb.jee.ConnectionDefinition> connectionDefinition = outboundResourceAdapter.getConnectionDefinition();

      org.apache.openejb.jee.ConnectionDefinition definition = null;
      for (org.apache.openejb.jee.ConnectionDefinition cd : connectionDefinition) {
        if (cd.getManagedConnectionFactoryClass().equals(cls.getName())) {
          definition = cd;
          break;
        }
      }

      if (definition == null) {
        definition = new org.apache.openejb.jee.ConnectionDefinition();
        outboundResourceAdapter.getConnectionDefinition().add(definition);
      }

      if (definition.getManagedConnectionFactoryClass() == null) {
        definition.setManagedConnectionFactoryClass(cls.getName());
      }
View Full Code Here

          for (Class<? extends WorkContext> cls : annotationRequiredWorkContexts) {
            requiredWorkContext.add(cls.getName());
          }
        }

        OutboundResourceAdapter outboundResourceAdapter = connector.getResourceAdapter().getOutboundResourceAdapter();
        if (outboundResourceAdapter == null) {
          outboundResourceAdapter = new OutboundResourceAdapter();
          connector.getResourceAdapter().setOutboundResourceAdapter(outboundResourceAdapter);
        }

        List<AuthenticationMechanism> authenticationMechanisms = outboundResourceAdapter.getAuthenticationMechanism();
        javax.resource.spi.AuthenticationMechanism[] authMechanisms = connectorAnnotation.authMechanisms();
        if (authenticationMechanisms.size() == 0) {
          for (javax.resource.spi.AuthenticationMechanism am : authMechanisms) {
            AuthenticationMechanism authMechanism = new AuthenticationMechanism();
            authMechanism.setAuthenticationMechanismType(am.authMechanism());
            authMechanism.setCredentialInterface(am.credentialInterface().toString());
            authMechanism.setDescriptions(stringsToTexts(am.description()));

            authenticationMechanisms.add(authMechanism);
          }
        }

        if (outboundResourceAdapter.getTransactionSupport() == null) {
          outboundResourceAdapter.setTransactionSupport(TransactionSupportType.fromValue(connectorAnnotation.transactionSupport().toString()));
        }

        if (outboundResourceAdapter.isReauthenticationSupport() == null) {
          outboundResourceAdapter.setReauthenticationSupport(connectorAnnotation.reauthenticationSupport());
        }
          } else {
            // we couldn't process a connector class - probably a validation issue which we should warn about.
          }
View Full Code Here

* @version $Rev$ $Date$
*/
public class TldTaglibXml {

    public static TldTaglib unmarshal(final InputStream inputStream) throws Exception {
        return Sxc.unmarshalJavaee(new TldTaglib$JAXB(), inputStream);
    }
View Full Code Here

    public static TldTaglib unmarshal(final URL url) throws Exception {
        final InputStream inputStream = IO.read(url);
        try {
            final XMLStreamReader filter = new TaglibNamespaceFilter(Sxc.prepareReader(inputStream));
            return Sxc.unmarhsal(new TldTaglib$JAXB(), new XoXMLStreamReaderImpl(filter));
        } finally {
            IO.close(inputStream);
        }
    }
View Full Code Here

            IO.close(inputStream);
        }
    }

    public static void marshal(final TldTaglib taglib, final OutputStream outputStream) throws Exception {
        Sxc.marshal(new TldTaglib$JAXB(), taglib, new StreamResult(outputStream));
    }
View Full Code Here

    }

    public static WebApp unmarshal(final URL url) throws Exception {
        final InputStream inputStream = IO.read(url);
        try {
            return Sxc.unmarshalJavaee(new WebApp$JAXB(), inputStream);
        } finally {
            IO.close(inputStream);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.OutboundResourceAdapter$JAXB

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.