Author: remy.maucherat(a)jboss.com
Date: 2008-04-28 09:01:40 -0400 (Mon, 28 Apr 2008)
New Revision: 597
Added:
trunk/java/javax/persistence/PersistenceProperty.java
Modified:
trunk/java/javax/annotation/security/DenyAll.java
trunk/java/javax/ejb/EJB.java
trunk/java/javax/persistence/PersistenceContext.java
trunk/java/org/apache/catalina/deploy/NamingResources.java
trunk/java/org/apache/catalina/manager/ManagerServlet.java
trunk/java/org/apache/jasper/compiler/Generator.java
trunk/webapps/docs/changelog.xml
Log:
- Port a bunch of Tomcat 6 patches, the most significant being the correction of the
quoting fix.
Modified: trunk/java/javax/annotation/security/DenyAll.java
===================================================================
--- trunk/java/javax/annotation/security/DenyAll.java 2008-04-28 13:00:31 UTC (rev 596)
+++ trunk/java/javax/annotation/security/DenyAll.java 2008-04-28 13:01:40 UTC (rev 597)
@@ -23,7 +23,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-(a)Target({ElementType.TYPE, ElementType.METHOD})
+(a)Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface DenyAll {
Modified: trunk/java/javax/ejb/EJB.java
===================================================================
--- trunk/java/javax/ejb/EJB.java 2008-04-28 13:00:31 UTC (rev 596)
+++ trunk/java/javax/ejb/EJB.java 2008-04-28 13:01:40 UTC (rev 597)
@@ -28,6 +28,7 @@
public @interface EJB {
String name() default "";
+ String description() default "";
Class beanInterface() default java.lang.Object.class;
String beanName() default "";
String mappedName() default "";
Modified: trunk/java/javax/persistence/PersistenceContext.java
===================================================================
--- trunk/java/javax/persistence/PersistenceContext.java 2008-04-28 13:00:31 UTC (rev
596)
+++ trunk/java/javax/persistence/PersistenceContext.java 2008-04-28 13:01:40 UTC (rev
597)
@@ -34,4 +34,5 @@
String name() default "";
String unitName() default "";
PersistenceContextType type() default PersistenceContextType.TRANSACTION;
+ PersistenceProperty[] properties() default {};
}
Added: trunk/java/javax/persistence/PersistenceProperty.java
===================================================================
--- trunk/java/javax/persistence/PersistenceProperty.java (rev 0)
+++ trunk/java/javax/persistence/PersistenceProperty.java 2008-04-28 13:01:40 UTC (rev
597)
@@ -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({})
+(a)Retention(RetentionPolicy.RUNTIME)
+
+public @interface PersistenceProperty {
+ String name();
+ String value();
+}
Modified: trunk/java/org/apache/catalina/deploy/NamingResources.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/NamingResources.java 2008-04-28 13:00:31 UTC
(rev 596)
+++ trunk/java/org/apache/catalina/deploy/NamingResources.java 2008-04-28 13:01:40 UTC
(rev 597)
@@ -300,7 +300,7 @@
entries.put(resource.getName(), resource.getType());
}
- synchronized (localEjbs) {
+ synchronized (resourceEnvRefs) {
resource.setNamingResources(this);
resourceEnvRefs.put(resource.getName(), resource);
}
@@ -661,7 +661,7 @@
ContextLocalEjb localEjb = null;
synchronized (localEjbs) {
- localEjb = (ContextLocalEjb) ejbs.remove(name);
+ localEjb = (ContextLocalEjb) localEjbs.remove(name);
}
if (localEjb != null) {
support.firePropertyChange("localEjb", localEjb, null);
@@ -735,13 +735,13 @@
entries.remove(name);
- String type = null;
+ ContextResourceEnvRef resourceEnvRef = null;
synchronized (resourceEnvRefs) {
- type = (String) resourceEnvRefs.remove(name);
+ resourceEnvRef = (ContextResourceEnvRef) resourceEnvRefs.remove(name);
}
- if (type != null) {
- support.firePropertyChange("resourceEnvRef",
- name + ":" + type, null);
+ if (resourceEnvRef != null) {
+ support.firePropertyChange("resourceEnvRef", resourceEnvRef,
null);
+ resourceEnvRef.setNamingResources(null);
}
}
Modified: trunk/java/org/apache/catalina/manager/ManagerServlet.java
===================================================================
--- trunk/java/org/apache/catalina/manager/ManagerServlet.java 2008-04-28 13:00:31 UTC
(rev 596)
+++ trunk/java/org/apache/catalina/manager/ManagerServlet.java 2008-04-28 13:01:40 UTC
(rev 597)
@@ -363,6 +363,8 @@
serverinfo(writer);
} else if (command.equals("/expire")) {
expireSessions(writer, path, request);
+ } else if (command.equals("/sessions")) {
+ expireSessions(writer, path, request);
} else if (command.equals("/start")) {
start(writer, path);
} else if (command.equals("/stop")) {
Modified: trunk/java/org/apache/jasper/compiler/Generator.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Generator.java 2008-04-28 13:00:31 UTC (rev
596)
+++ trunk/java/org/apache/jasper/compiler/Generator.java 2008-04-28 13:01:40 UTC (rev
597)
@@ -294,6 +294,9 @@
attrNames[i] = attrs.getQName(i);
}
Arrays.sort(attrNames, Collections.reverseOrder());
+ if (attrNames.length > 0) {
+ poolName = poolName + "&";
+ }
for (int i = 0; i < attrNames.length; i++) {
poolName = poolName + "_" + attrNames[i];
}
@@ -1751,14 +1754,9 @@
out.print(" ");
out.print(attrs.getQName(i));
out.print("=");
- String quote = DOUBLE_QUOTE;
- String value = attrs.getValue(i);
- if (value.indexOf('"') != -1) {
- quote = SINGLE_QUOTE;
- }
- out.print(quote);
- out.print(value);
- out.print(quote);
+ out.print(DOUBLE_QUOTE);
+ out.print(attrs.getValue(i).replace("\"",
"""));
+ out.print(DOUBLE_QUOTE);
}
attrs = n.getAttributes();
@@ -1773,14 +1771,9 @@
out.print(attributeValue(jspAttrs[i], false, String.class));
out.print(" + \"\\\"");
} else {
- String quote = DOUBLE_QUOTE;
- String value = attrs.getValue(i);
- if (value.indexOf('"') != -1) {
- quote = SINGLE_QUOTE;
- }
- out.print(quote);
- out.print(value);
- out.print(quote);
+ out.print(DOUBLE_QUOTE);
+ out.print(attrs.getValue(i).replace("\"",
"""));
+ out.print(DOUBLE_QUOTE);
}
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-04-28 13:00:31 UTC (rev 596)
+++ trunk/webapps/docs/changelog.xml 2008-04-28 13:01:40 UTC (rev 597)
@@ -78,6 +78,16 @@
<bug>29936</bug>: In some circumstances, Tomcat would use the parser
from a webapp
to parse web.xml and possibly context.xml files. (markt)
</fix>
+ <fix>
+ <bug>43470</bug>: Fix cut and paste errors in NamingResources,
submitted
+ by Lucas Galfaso. (markt)
+ </fix>
+ <fix>
+ <bug>43425</bug>: Annotations not spec compliant. Submitted by Dain
Sundstrom. (markt)
+ </fix>
+ <fix>
+ <bug>43366</bug>: Provide backwards compatibility for sessions
command. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
@@ -143,6 +153,12 @@
<fix>
<bug>31257</bug>: Quote endorsed dirs if they contain a space.
(markt)
</fix>
+ <fix>
+ <bug>43617</bug>: Correctly handle quotes in attribute values for
tag(x) files. (remm)
+ </fix>
+ <fix>
+ <bug>44877</bug>: Prevent collisions in tag pool names. (markt)
+ </fix>
</changelog>
</subsection>
</section>