Fix bug https://issues.apache.org/bugzilla/show_bug.cgi?id=43425
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 25 Apr 2008 22:55:38 +0000 (22:55 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 25 Apr 2008 22:55:38 +0000 (22:55 +0000)
Annotations not spec compliant.
Patch provided by Dain Sundstrom.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@651732 13f79535-47bb-0310-9956-ffa450edef68

java/javax/annotation/security/DenyAll.java
java/javax/ejb/EJB.java
java/javax/persistence/PersistenceContext.java
java/javax/persistence/PersistenceProperty.java [new file with mode: 0644]

index c16550a..f54b925 100644 (file)
@@ -23,7 +23,7 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-@Target({ElementType.TYPE, ElementType.METHOD})
+@Target({ElementType.METHOD})
 @Retention(RetentionPolicy.RUNTIME)
 
 public @interface DenyAll {
index 99dcd7a..1ea40a9 100644 (file)
@@ -28,6 +28,7 @@ import java.lang.annotation.Target;
 
 public @interface EJB {
    String name() default "";
+   String description() default "";
    Class beanInterface() default java.lang.Object.class;
    String beanName() default "";
    String mappedName() default "";
index 20b58d8..e8417e2 100644 (file)
@@ -30,4 +30,5 @@ public @interface PersistenceContext {
    String name() default "";
    String unitName() default "";
    PersistenceContextType type() default PersistenceContextType.TRANSACTION;
+   PersistenceProperty[] properties() default {};
 }
diff --git a/java/javax/persistence/PersistenceProperty.java b/java/javax/persistence/PersistenceProperty.java
new file mode 100644 (file)
index 0000000..372a870
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.persistence;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Target({})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface PersistenceProperty {
+   String name();
+   String value();
+}