Author: remm Date: Wed Jun 21 02:21:32 2006 New Revision: 415948 URL: http://svn.apache.org/viewvc?rev=415948&view=rev Log: - Fix annotation names.
Added: tomcat/tc6.0.x/trunk/java/javax/annotation/security/DeclareRoles.java (with props) tomcat/tc6.0.x/trunk/java/javax/ejb/ tomcat/tc6.0.x/trunk/java/javax/ejb/EJB.java (with props) tomcat/tc6.0.x/trunk/java/javax/ejb/EJBs.java (with props) Removed: tomcat/tc6.0.x/trunk/java/javax/annotation/EJB.java tomcat/tc6.0.x/trunk/java/javax/annotation/EJBs.java tomcat/tc6.0.x/trunk/java/javax/annotation/security/DeclaresRoles.java Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/AnnotationProcessor.java tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java Added: tomcat/tc6.0.x/trunk/java/javax/annotation/security/DeclareRoles.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/annotation/security/DeclareRoles.java?rev=415948&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/java/javax/annotation/security/DeclareRoles.java (added) +++ tomcat/tc6.0.x/trunk/java/javax/annotation/security/DeclareRoles.java Wed Jun 21 02:21:32 2006 @@ -0,0 +1,30 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation.security; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + [EMAIL PROTECTED]({ElementType.TYPE}) [EMAIL PROTECTED](RetentionPolicy.RUNTIME) + +public @interface DeclareRoles { + public String[] value(); +} Propchange: tomcat/tc6.0.x/trunk/java/javax/annotation/security/DeclareRoles.java ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/java/javax/ejb/EJB.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/ejb/EJB.java?rev=415948&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/java/javax/ejb/EJB.java (added) +++ tomcat/tc6.0.x/trunk/java/javax/ejb/EJB.java Wed Jun 21 02:21:32 2006 @@ -0,0 +1,34 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.ejb; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + [EMAIL PROTECTED]({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER}) [EMAIL PROTECTED](RetentionPolicy.RUNTIME) + +public @interface EJB { + String name() default ""; + Class businessInterface() default java.lang.Object.class; + String beanName() default ""; + String mappedName() default ""; + String description() default ""; +} Propchange: tomcat/tc6.0.x/trunk/java/javax/ejb/EJB.java ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/tc6.0.x/trunk/java/javax/ejb/EJBs.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/ejb/EJBs.java?rev=415948&view=auto ============================================================================== --- tomcat/tc6.0.x/trunk/java/javax/ejb/EJBs.java (added) +++ tomcat/tc6.0.x/trunk/java/javax/ejb/EJBs.java Wed Jun 21 02:21:32 2006 @@ -0,0 +1,30 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.ejb; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + [EMAIL PROTECTED]({ElementType.TYPE}) [EMAIL PROTECTED](RetentionPolicy.RUNTIME) + +public @interface EJBs { + EJB[] value(); +} Propchange: tomcat/tc6.0.x/trunk/java/javax/ejb/EJBs.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java?rev=415948&r1=415947&r2=415948&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java Wed Jun 21 02:21:32 2006 @@ -20,7 +20,7 @@ import javax.annotation.Resource; import javax.annotation.Resources; -import javax.annotation.security.DeclaresRoles; +import javax.annotation.security.DeclareRoles; import javax.annotation.security.RunAs; import org.apache.catalina.Container; @@ -240,9 +240,9 @@ * Ref JSR 250, equivalent to the security-role element in * the deployment descriptor */ - if (classClass.isAnnotationPresent(DeclaresRoles.class)) { - DeclaresRoles annotation = (DeclaresRoles) - classClass.getAnnotation(DeclaresRoles.class); + if (classClass.isAnnotationPresent(DeclareRoles.class)) { + DeclareRoles annotation = (DeclareRoles) + classClass.getAnnotation(DeclareRoles.class); for (int i = 0; annotation.value() != null && i < annotation.value().length; i++) { context.addSecurityRole(annotation.value()[i]); } Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/AnnotationProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/AnnotationProcessor.java?rev=415948&r1=415947&r2=415948&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/AnnotationProcessor.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/AnnotationProcessor.java Wed Jun 21 02:21:32 2006 @@ -21,10 +21,10 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import javax.annotation.EJB; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.annotation.Resource; +import javax.ejb.EJB; import javax.naming.NamingException; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceUnit; Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java?rev=415948&r1=415947&r2=415948&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java Wed Jun 21 02:21:32 2006 @@ -21,10 +21,10 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import javax.annotation.EJB; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.annotation.Resource; +import javax.ejb.EJB; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]