Package org.apache.openejb.jee

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


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

            final 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 (final ConnectionDefinition connection : outbound.getConnectionDefinition()) {

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


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

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

                final List<AuthenticationMechanism> authenticationMechanisms = outboundResourceAdapter.getAuthenticationMechanism();
                final javax.resource.spi.AuthenticationMechanism[] authMechanisms = connectorAnnotation.authMechanisms();
                if (authenticationMechanisms.size() == 0) {
                    for (final javax.resource.spi.AuthenticationMechanism am : authMechanisms) {
                        final 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());
                }
            }

            // process @ConnectionDescription(s)
            List<Class<?>> classes = finder.findAnnotatedClasses(ConnectionDefinitions.class);
View Full Code Here

        }

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

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

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

            org.apache.openejb.jee.ConnectionDefinition definition = null;
            for (final 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

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

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

                        final 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

          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

    }

    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

                        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

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

            final 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 (final ConnectionDefinition connection : outbound.getConnectionDefinition()) {

                    final String id = this.getId(connection, outbound, connectorModule);
                    final String className = connection.getManagedConnectionFactoryClass();
                    final 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

          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

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.