- Fix annotation names.
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 21 Jun 2006 09:21:32 +0000 (09:21 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 21 Jun 2006 09:21:32 +0000 (09:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@415948 13f79535-47bb-0310-9956-ffa450edef68

java/javax/annotation/EJB.java [deleted file]
java/javax/annotation/EJBs.java [deleted file]
java/javax/annotation/security/DeclareRoles.java [new file with mode: 0644]
java/javax/annotation/security/DeclaresRoles.java [deleted file]
java/javax/ejb/EJB.java [new file with mode: 0644]
java/javax/ejb/EJBs.java [new file with mode: 0644]
java/org/apache/catalina/startup/WebAnnotationSet.java
java/org/apache/catalina/util/AnnotationProcessor.java
java/org/apache/jasper/runtime/AnnotationProcessor.java

diff --git a/java/javax/annotation/EJB.java b/java/javax/annotation/EJB.java
deleted file mode 100644 (file)
index 13b308e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*\r
- * Copyright 2006 The Apache Software Foundation.\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-\r
-package javax.annotation;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER})\r
-@Retention(RetentionPolicy.RUNTIME)\r
-\r
-public @interface EJB {\r
-   String name() default "";\r
-   Class businessInterface() default java.lang.Object.class;\r
-   String beanName() default "";\r
-   String mappedName() default "";\r
-   String description() default "";\r
-}\r
diff --git a/java/javax/annotation/EJBs.java b/java/javax/annotation/EJBs.java
deleted file mode 100644 (file)
index 62e7a9a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*\r
- * Copyright 2006 The Apache Software Foundation.\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-\r
-package javax.annotation;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Target({ElementType.TYPE})\r
-@Retention(RetentionPolicy.RUNTIME)\r
-\r
-public @interface EJBs {\r
-   EJB[] value();\r
-}\r
diff --git a/java/javax/annotation/security/DeclareRoles.java b/java/javax/annotation/security/DeclareRoles.java
new file mode 100644 (file)
index 0000000..95f8aa1
--- /dev/null
@@ -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;
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface DeclareRoles {
+    public String[] value();
+}
diff --git a/java/javax/annotation/security/DeclaresRoles.java b/java/javax/annotation/security/DeclaresRoles.java
deleted file mode 100644 (file)
index ccbd951..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*\r
- * Copyright 2006 The Apache Software Foundation.\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-\r
-package javax.annotation.security;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Target({ElementType.TYPE})\r
-@Retention(RetentionPolicy.RUNTIME)\r
-\r
-public @interface DeclaresRoles {\r
-    public String[] value();\r
-}\r
diff --git a/java/javax/ejb/EJB.java b/java/javax/ejb/EJB.java
new file mode 100644 (file)
index 0000000..0a4e445
--- /dev/null
@@ -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;
+
+@Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface EJB {
+   String name() default "";
+   Class businessInterface() default java.lang.Object.class;
+   String beanName() default "";
+   String mappedName() default "";
+   String description() default "";
+}
diff --git a/java/javax/ejb/EJBs.java b/java/javax/ejb/EJBs.java
new file mode 100644 (file)
index 0000000..50ed5d9
--- /dev/null
@@ -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;
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface EJBs {
+   EJB[] value();
+}
index eef024a..f2261d1 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.catalina.startup;
 \r
 import javax.annotation.Resource;\r
 import javax.annotation.Resources;\r
-import javax.annotation.security.DeclaresRoles;\r
+import javax.annotation.security.DeclareRoles;\r
 import javax.annotation.security.RunAs;\r
 \r
 import org.apache.catalina.Container;\r
@@ -240,9 +240,9 @@ public class WebAnnotationSet {
          * Ref JSR 250, equivalent to the security-role element in\r
          * the deployment descriptor\r
          */\r
-        if (classClass.isAnnotationPresent(DeclaresRoles.class)) {\r
-            DeclaresRoles annotation = (DeclaresRoles) \r
-                classClass.getAnnotation(DeclaresRoles.class);\r
+        if (classClass.isAnnotationPresent(DeclareRoles.class)) {\r
+            DeclareRoles annotation = (DeclareRoles) \r
+                classClass.getAnnotation(DeclareRoles.class);\r
             for (int i = 0; annotation.value() != null && i < annotation.value().length; i++) {\r
                 context.addSecurityRole(annotation.value()[i]);\r
             }\r
index 9288eb6..6e11428 100644 (file)
@@ -21,10 +21,10 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;\r
 import java.lang.reflect.Modifier;\r
 \r
-import javax.annotation.EJB;\r
 import javax.annotation.PostConstruct;\r
 import javax.annotation.PreDestroy;\r
 import javax.annotation.Resource;\r
+import javax.ejb.EJB;\r
 import javax.naming.NamingException;\r
 import javax.persistence.PersistenceContext;\r
 import javax.persistence.PersistenceUnit;\r
index 915e5f4..c9a3197 100644 (file)
@@ -21,10 +21,10 @@ import java.lang.reflect.InvocationTargetException;
 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;