Package org.apache.geronimo.xbeans.javaee

Examples of org.apache.geronimo.xbeans.javaee.ResourceRefType


                    try {

                        log.debug("processResource(): Does not exist in DD: " + resourceName);

                        // Doesn't exist in deployment descriptor -- add new
                        ResourceRefType resourceRef = annotatedApp.addNewResourceRef();

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
                        //------------------------------------------------------------------------------

                        // description
                        String descriptionAnnotation = annotation.description();
                        if (!descriptionAnnotation.equals("")) {
                            DescriptionType description = resourceRef.addNewDescription();
                            description.setStringValue(descriptionAnnotation);
                        }

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Container");
                            resourceRef.setResAuth(resAuth);
                        } else if (annotation.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Application");
                            resourceRef.setResAuth(resAuth);
                        }

                        // sharing scope
                        ResSharingScopeType resScope = resourceRef.addNewResSharingScope();
                        resScope.setStringValue(annotation.shareable() ? "Shareable" : "Unshareable");
                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceRefBuilder: Exception caught while processing <resource-ref>");
View Full Code Here


                    try {

                        log.debug("processResource(): Does not exist in DD: " + resourceName);

                        // Doesn't exist in deployment descriptor -- add new
                        ResourceRefType resourceRef = annotatedApp.addNewResourceRef();

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
                        //------------------------------------------------------------------------------

                        // description
                        String descriptionAnnotation = annotation.description();
                        if (!descriptionAnnotation.equals("")) {
                            DescriptionType description = resourceRef.addNewDescription();
                            description.setStringValue(descriptionAnnotation);
                        }

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Container");
                            resourceRef.setResAuth(resAuth);
                        } else if (annotation.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Application");
                            resourceRef.setResAuth(resAuth);
                        }

                        // sharing scope
                        ResSharingScopeType resScope = resourceRef.addNewResSharingScope();
                        resScope.setStringValue(annotation.shareable() ? "Shareable" : "Unshareable");
                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceRefBuilder: Exception caught while processing <resource-ref>");
View Full Code Here

                    try {

                        log.debug("processResource(): Does not exist in DD: " + resourceName);

                        // Doesn't exist in deployment descriptor -- add new
                        ResourceRefType resourceRef = annotatedApp.addNewResourceRef();

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
                        //------------------------------------------------------------------------------

                        // description
                        String descriptionAnnotation = annotation.description();
                        if (!descriptionAnnotation.equals("")) {
                            DescriptionType description = resourceRef.addNewDescription();
                            description.setStringValue(descriptionAnnotation);
                        }

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Container");
                            resourceRef.setResAuth(resAuth);
                        } else if (annotation.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Application");
                            resourceRef.setResAuth(resAuth);
                        }

                        // sharing scope
                        ResSharingScopeType resScope = resourceRef.addNewResSharingScope();
                        resScope.setStringValue(annotation.shareable() ? "Shareable" : "Unshareable");
                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceRefBuilder: Exception caught while processing <resource-ref>");
View Full Code Here

                    try {

                        log.debug("processResource(): Does not exist in DD: " + resourceName);

                        // Doesn't exist in deployment descriptor -- add new
                        ResourceRefType resourceRef = annotatedApp.addNewResourceRef();

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
                        //------------------------------------------------------------------------------

                        // description
                        String descriptionAnnotation = annotation.description();
                        if (!descriptionAnnotation.equals("")) {
                            DescriptionType description = resourceRef.addNewDescription();
                            description.setStringValue(descriptionAnnotation);
                        }

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Container");
                            resourceRef.setResAuth(resAuth);
                        } else if (annotation.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Application");
                            resourceRef.setResAuth(resAuth);
                        }

                        // sharing scope
                        ResSharingScopeType resScope = resourceRef.addNewResSharingScope();
                        resScope.setStringValue(annotation.shareable() ? "Shareable" : "Unshareable");
                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceRefBuilder: Exception caught while processing <resource-ref>");
View Full Code Here

                    try {

                        log.debug("processResource(): Does not exist in DD: " + resourceName);

                        // Doesn't exist in deployment descriptor -- add new
                        ResourceRefType resourceRef = annotatedApp.addNewResourceRef();

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
                        //------------------------------------------------------------------------------

                        // description
                        String descriptionAnnotation = annotation.description();
                        if (!descriptionAnnotation.equals("")) {
                            DescriptionType description = resourceRef.addNewDescription();
                            description.setStringValue(descriptionAnnotation);
                        }

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Container");
                            resourceRef.setResAuth(resAuth);
                        } else if (annotation.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Application");
                            resourceRef.setResAuth(resAuth);
                        }

                        // sharing scope
                        ResSharingScopeType resScope = resourceRef.addNewResSharingScope();
                        resScope.setStringValue(annotation.shareable() ? "Shareable" : "Unshareable");
                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceRefBuilder: Exception caught while processing <resource-ref>");
View Full Code Here

                    try {

                        log.debug("processResource(): Does not exist in DD: " + resourceName);

                        // Doesn't exist in deployment descriptor -- add new
                        ResourceRefType resourceRef = annotatedApp.addNewResourceRef();

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
                        //------------------------------------------------------------------------------

                        // description
                        String descriptionAnnotation = annotation.description();
                        if (!descriptionAnnotation.equals("")) {
                            DescriptionType description = resourceRef.addNewDescription();
                            description.setStringValue(descriptionAnnotation);
                        }

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Container");
                            resourceRef.setResAuth(resAuth);
                        } else if (annotation.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Application");
                            resourceRef.setResAuth(resAuth);
                        }

                        // sharing scope
                        ResSharingScopeType resScope = resourceRef.addNewResSharingScope();
                        resScope.setStringValue(annotation.shareable() ? "Shareable" : "Unshareable");
                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceRefBuilder: Exception caught while processing <resource-ref>");
View Full Code Here

                    try {

                        log.debug("processResource(): Does not exist in DD: " + resourceName);

                        // Doesn't exist in deployment descriptor -- add new
                        ResourceRefType resourceRef = annotatedApp.addNewResourceRef();

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
                        //------------------------------------------------------------------------------

                        // description
                        String descriptionAnnotation = annotation.description();
                        if (!descriptionAnnotation.equals("")) {
                            DescriptionType description = resourceRef.addNewDescription();
                            description.setStringValue(descriptionAnnotation);
                        }

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Container");
                            resourceRef.setResAuth(resAuth);
                        } else if (annotation.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Application");
                            resourceRef.setResAuth(resAuth);
                        }

                        // sharing scope
                        ResSharingScopeType resScope = resourceRef.addNewResSharingScope();
                        resScope.setStringValue(annotation.shareable() ? "Shareable" : "Unshareable");
                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceRefBuilder: Exception caught while processing <resource-ref>");
View Full Code Here

                    try {

                        log.debug("processResource(): Does not exist in DD: " + resourceName);

                        // Doesn't exist in deployment descriptor -- add new
                        ResourceRefType resourceRef = annotatedApp.addNewResourceRef();

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
                        //------------------------------------------------------------------------------

                        // description
                        String descriptionAnnotation = annotation.description();
                        if (!descriptionAnnotation.equals("")) {
                            DescriptionType description = resourceRef.addNewDescription();
                            description.setStringValue(descriptionAnnotation);
                        }

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Container");
                            resourceRef.setResAuth(resAuth);
                        } else if (annotation.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Application");
                            resourceRef.setResAuth(resAuth);
                        }

                        // sharing scope
                        ResSharingScopeType resScope = resourceRef.addNewResSharingScope();
                        resScope.setStringValue(annotation.shareable() ? "Shareable" : "Unshareable");
                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceRefBuilder: Exception caught while processing <resource-ref>");
View Full Code Here

            }
            if ( !exists ) {
                try {

                    // Doesn't exist in deployment descriptor -- add new
                    ResourceRefType resourceRef = webApp.addNewResourceRef();

                    //------------------------------------------------------------------------------
                    // <resource-ref> required elements:
                    //------------------------------------------------------------------------------

                    // resource-ref-name
                    JndiNameType resourceRefName = JndiNameType.Factory.newInstance();
                    resourceRefName.setStringValue( resourceName );
                    resourceRef.setResRefName( resourceRefName );

                    if ( !resourceType.equals("") ) {
                        // resource-ref-type
                        FullyQualifiedClassType qualifiedClass = FullyQualifiedClassType.Factory.newInstance();
                        qualifiedClass.setStringValue( resourceType );
                        resourceRef.setResType( qualifiedClass );
                    }
                    else if ( !injectionJavaType.equals("") ) {
                        // injectionTarget
                        InjectionTargetType injectionTarget = InjectionTargetType.Factory.newInstance();
                        FullyQualifiedClassType qualifiedClass = FullyQualifiedClassType.Factory.newInstance();
                        JavaIdentifierType javaType = JavaIdentifierType.Factory.newInstance();
                        qualifiedClass.setStringValue( injectionClass );
                        javaType.setStringValue( injectionJavaType );
                        injectionTarget.setInjectionTargetClass( qualifiedClass );
                        injectionTarget.setInjectionTargetName( javaType );
                        int arraySize = resourceRef.sizeOfInjectionTargetArray();
                        resourceRef.insertNewInjectionTarget( arraySize );
                        resourceRef.setInjectionTargetArray( arraySize, injectionTarget );
                    }

                    //------------------------------------------------------------------------------
                    // <resource-ref> optional elements:
                    //------------------------------------------------------------------------------

                    // description
                    String descriptionAnnotation = annotation.description();
                    if ( descriptionAnnotation.length() > 0 ) {
                        DescriptionType description = DescriptionType.Factory.newInstance();
                        description.setStringValue( descriptionAnnotation );
                        int arraySize = resourceRef.sizeOfDescriptionArray();
                        resourceRef.insertNewDescription( arraySize );
                        resourceRef.setDescriptionArray( arraySize,description );
                    }

                    // authentication
                    ResAuthType resAuth = ResAuthType.Factory.newInstance();
                    if ( annotation.authenticationType() == Resource.AuthenticationType.CONTAINER ) {
                        resAuth.setStringValue( "Container" );
                    }
                    else if ( annotation.authenticationType() == Resource.AuthenticationType.APPLICATION ) {
                        resAuth.setStringValue( "Application" );
                    }
                    resourceRef.setResAuth( resAuth );

                    // sharing scope
                    ResSharingScopeType resScope = ResSharingScopeType.Factory.newInstance();
                    resScope.setStringValue( annotation.shareable() ? "Shareable" : "Unshareable" );
                    resourceRef.setResSharingScope( resScope );

                    // mappedName
                    String mappdedNameAnnotation = annotation.mappedName();
                    if ( mappdedNameAnnotation.length() > 0 ) {
                        XsdStringType mappedName = XsdStringType.Factory.newInstance();
                        mappedName.setStringValue( mappdedNameAnnotation );
                        resourceRef.setMappedName( mappedName );
                    }

                }
                catch ( Exception anyException ) {
                    log.debug( "ResourceAnnotationHelper: Exception caught while processing <resource-ref>" );
View Full Code Here

                    try {

                        log.debug("processResource(): Does not exist in DD: " + resourceName);

                        // Doesn't exist in deployment descriptor -- add new
                        ResourceRefType resourceRef = annotatedApp.addNewResourceRef();

                        //------------------------------------------------------------------------------
                        // <resource-ref> required elements:
                        //------------------------------------------------------------------------------

                        // resource-ref-name
                        JndiNameType resourceRefName = resourceRef.addNewResRefName();
                        resourceRefName.setStringValue(resourceName);

                        if (!resourceType.equals("")) {
                            // resource-ref-type
                            FullyQualifiedClassType qualifiedClass = resourceRef.addNewResType();
                            qualifiedClass.setStringValue(resourceType);
                        }
                        if (method != null || field != null) {
                            // injectionTarget
                            InjectionTargetType injectionTarget = resourceRef.addNewInjectionTarget();
                            configureInjectionTarget(injectionTarget, method, field);
                        }

                        //------------------------------------------------------------------------------
                        // <resource-ref> optional elements:
                        //------------------------------------------------------------------------------

                        // description
                        String descriptionAnnotation = annotation.description();
                        if (!descriptionAnnotation.equals("")) {
                            DescriptionType description = resourceRef.addNewDescription();
                            description.setStringValue(descriptionAnnotation);
                        }

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Container");
                            resourceRef.setResAuth(resAuth);
                        } else if (annotation.authenticationType() == Resource.AuthenticationType.APPLICATION) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
                            resAuth.setStringValue("Application");
                            resourceRef.setResAuth(resAuth);
                        }

                        // sharing scope
                        ResSharingScopeType resScope = resourceRef.addNewResSharingScope();
                        resScope.setStringValue(annotation.shareable() ? "Shareable" : "Unshareable");
                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceRefBuilder: Exception caught while processing <resource-ref>");
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xbeans.javaee.ResourceRefType

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.