Package javax.resource.spi

Examples of javax.resource.spi.SecurityPermission


        return SecurityPermission.class;
    }

    public HandlerProcessingResult processAnnotation(AnnotationInfo element) throws AnnotationProcessorException {
        AnnotatedElementHandler aeHandler = element.getProcessingContext().getHandler();
        SecurityPermission securityPermission = (SecurityPermission) element.getAnnotation();

        if (aeHandler instanceof RarBundleContext) {
            boolean isConnectionDefinition = hasConnectorAnnotation(element);
            if (isConnectionDefinition) {
                RarBundleContext rarContext = (RarBundleContext) aeHandler;
                ConnectorDescriptor desc = rarContext.getDescriptor();
                //XXX: Siva : For now use the first provided description
                String firstDesc = "";
                if (securityPermission.description().length > 0) {
                    firstDesc = securityPermission.description()[0];
                }
                com.sun.enterprise.deployment.SecurityPermission permission =
                        new com.sun.enterprise.deployment.SecurityPermission(firstDesc,
                                securityPermission.permissionSpec());
                desc.addSecurityPermission(permission);
            } else {
                getFailureResult(element, "Not a @Connector annotation : @SecurityPermission must " +
                        "be specified along with @Connector annotation", true);
            }
View Full Code Here

TOP

Related Classes of javax.resource.spi.SecurityPermission

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.