svn commit: r1421219 - /tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java
Author: jfclere Date: Thu Dec 13 10:54:42 2012 New Revision: 1421219 URL: http://svn.apache.org/viewvc?rev=1421219&view=rev Log: Make the clustering classes (well any classes) optional. Modified: tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java Modified: tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java?rev=1421219&r1=1421218&r2=1421219&view=diff == --- tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java (original) +++ tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java Thu Dec 13 10:54:42 2012 @@ -17,6 +17,7 @@ package org.apache.catalina.storeconfig; +import java.util.ArrayList; import java.util.HashMap; import java.util.Map; @@ -59,12 +60,37 @@ public class StoreRegistry { private String version; // Access Information -private static Class interfaces[] = { CatalinaCluster.class, -ChannelSender.class, ChannelReceiver.class, Channel.class, -MembershipService.class, ClusterDeployer.class, Realm.class, -Manager.class, DirContext.class, LifecycleListener.class, -Valve.class, ClusterListener.class, MessageListener.class, -DataSender.class, ChannelInterceptor.class, Member.class }; +private static Class interfaces[] = null; +private static String interfacesname[] = +{ "org.apache.catalina.ha.CatalinaCluster", +"org.apache.catalina.tribes.ChannelSender", +"org.apache.catalina.tribes.ChannelReceiver", +"org.apache.catalina.tribes.Channel", +"org.apache.catalina.tribes.MembershipService", +"org.apache.catalina.ha.ClusterDeployer", +"org.apache.catalina.Realm", +"org.apache.catalina.Manager", +"javax.naming.directory.DirContext", +"org.apache.catalina.LifecycleListener", +"org.apache.catalina.Valve", +"org.apache.catalina.ha.ClusterListener", +"org.apache.catalina.tribes.MessageListener", +"org.apache.catalina.tribes.DataSender", +"org.apache.catalina.tribes.ChannelInterceptor", +"org.apache.catalina.tribes.Member"}; + +static { + ArrayList interf = new ArrayList(); + for (String s: interfacesname) { + try { + Class classz = Class.forName(s); + interf.add(classz); + } catch (Throwable e) { + // Ignore it. + } + } + interfaces = interf.toArray(new Class[interf.size()]); +} /** * @return Returns the name. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54284] Util.objectNameValueNeedsQuote throws NPE for anonymous Filters
https://issues.apache.org/bugzilla/show_bug.cgi?id=54284 benjamin.gehrels_exter...@immobilienscout24.de changed: What|Removed |Added Version|7.0.26 |7.0.34 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54284] Util.objectNameValueNeedsQuote throws NPE for anonymous Filters
https://issues.apache.org/bugzilla/show_bug.cgi?id=54284 --- Comment #1 from benjamin.gehrels_exter...@immobilienscout24.de --- I just recognized that i created the bug with a wrong affected version number. The bug happens in Rel. 7.0.34, probably as a result of fixing #54170 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1421310 - in /tomcat/sandbox: storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig
Author: remm Date: Thu Dec 13 14:27:51 2012 New Revision: 1421310 URL: http://svn.apache.org/viewvc?rev=1421310&view=rev Log: Avoid replacement creating a duplicate. Modified: tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java Modified: tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java?rev=1421310&r1=1421309&r2=1421310&view=diff == --- tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java (original) +++ tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java Thu Dec 13 14:27:51 2012 @@ -93,9 +93,6 @@ public class ConnectorStoreAppender exte for (Iterator propertyIterator = propertyKeys.iterator(); propertyIterator .hasNext();) { String key = (String) propertyIterator.next(); -if (replacements.get(key) != null) { -key = (String) replacements.get(key); -} Object value = (Object) IntrospectionUtils.getProperty(bean, key); if (desc.isTransientAttribute(key)) { @@ -158,12 +155,28 @@ public class ConnectorStoreAppender exte continue; propertyKeys.add(descriptors[i].getName()); } -for (Iterator propertyIterator = protocolHandler.getAttributeNames(); propertyIterator -.hasNext();) { -Object key = propertyIterator.next(); -if (propertyKeys.contains(key)) -continue; -propertyKeys.add(key); +// Add the properties of the protocol handler +descriptors = Introspector.getBeanInfo( +protocolHandler.getClass()).getPropertyDescriptors(); +if (descriptors == null) { +descriptors = new PropertyDescriptor[0]; +} +for (int i = 0; i < descriptors.length; i++) { +if (descriptors[i] instanceof IndexedPropertyDescriptor) { +continue; // Indexed properties are not persisted +} +if (!isPersistable(descriptors[i].getPropertyType()) +|| (descriptors[i].getReadMethod() == null) +|| (descriptors[i].getWriteMethod() == null)) { +continue; // Must be a read-write primitive or String +} +String key = descriptors[i].getName(); +if (replacements.get(key) != null) { +key = (String) replacements.get(key); +} +if (!propertyKeys.contains(key)) { +propertyKeys.add(key); +} } return propertyKeys; } Modified: tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java?rev=1421310&r1=1421309&r2=1421310&view=diff == --- tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java (original) +++ tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java Thu Dec 13 14:27:51 2012 @@ -90,12 +90,9 @@ public class ConnectorStoreAppender exte List propertyKeys = getPropertyKeys((Connector) bean); // Create blank instance Object bean2 = defaultInstance(bean); -for (Iterator propertyIterator = propertyKeys.iterator(); propertyIterator -.hasNext();) { +Iterator propertyIterator = propertyKeys.iterator(); +while (propertyIterator.hasNext()) { String key = (String) propertyIterator.next(); -if (replacements.get(key) != null) { -key = (String) replacements.get(key); -} Object value = (Object) IntrospectionUtils.getProperty(bean, key); if (desc.isTransientAttribute(key)) { @@ -116,8 +113,9 @@ public class ConnectorStoreAppender exte // The property has its default value continue; } -if (isPrintValue(bean, bean2, key, desc)) +if (isPrintValue(bean, bean2, key, desc)) { printValue(writer, indent, key, value); +} } String protocol = ((Connector) bean).getProtocol(); if (protocol != null && !"HTTP/1.1".equals(protocol)) @@ -173,8 +171,12 @@ public class ConnectorSt
svn commit: r1421327 - in /tomcat/sandbox: storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig
Author: remm Date: Thu Dec 13 15:04:32 2012 New Revision: 1421327 URL: http://svn.apache.org/viewvc?rev=1421327&view=rev Log: Try out more accurate comparison with the connector bean and the protocol handler (the default constructor does not create the same protocol handler). Modified: tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java Modified: tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java?rev=1421327&r1=1421326&r2=1421327&view=diff == --- tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java (original) +++ tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java Thu Dec 13 15:04:32 2012 @@ -87,11 +87,13 @@ public class ConnectorStoreAppender exte writer.print("\""); } -List propertyKeys = getPropertyKeys((Connector) bean); +Connector connector = (Connector) bean; +String protocol = connector.getProtocol(); +List propertyKeys = getPropertyKeys(connector); // Create blank instance -Object bean2 = defaultInstance(bean); -for (Iterator propertyIterator = propertyKeys.iterator(); propertyIterator -.hasNext();) { +Object bean2 = new Connector(protocol);//defaultInstance(bean); +Iterator propertyIterator = propertyKeys.iterator(); +while (propertyIterator.hasNext()) { String key = (String) propertyIterator.next(); Object value = (Object) IntrospectionUtils.getProperty(bean, key); @@ -113,10 +115,10 @@ public class ConnectorStoreAppender exte // The property has its default value continue; } -if (isPrintValue(bean, bean2, key, desc)) +if (isPrintValue(bean, bean2, key, desc)) { printValue(writer, indent, key, value); +} } -String protocol = ((Connector) bean).getProtocol(); if (protocol != null && !"HTTP/1.1".equals(protocol)) super.printValue(writer, indent, "protocol", protocol); Modified: tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java?rev=1421327&r1=1421326&r2=1421327&view=diff == --- tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java (original) +++ tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java Thu Dec 13 15:04:32 2012 @@ -87,9 +87,11 @@ public class ConnectorStoreAppender exte writer.print("\""); } -List propertyKeys = getPropertyKeys((Connector) bean); +Connector connector = (Connector) bean; +String protocol = connector.getProtocol(); +List propertyKeys = getPropertyKeys(connector); // Create blank instance -Object bean2 = defaultInstance(bean); +Object bean2 = new Connector(protocol);//defaultInstance(bean); Iterator propertyIterator = propertyKeys.iterator(); while (propertyIterator.hasNext()) { String key = (String) propertyIterator.next(); @@ -117,7 +119,6 @@ public class ConnectorStoreAppender exte printValue(writer, indent, key, value); } } -String protocol = ((Connector) bean).getProtocol(); if (protocol != null && !"HTTP/1.1".equals(protocol)) super.printValue(writer, indent, "protocol", protocol); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Trivial Update of "ClaudiaRKK" by ClaudiaRKK
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "ClaudiaRKK" page has been changed by ClaudiaRKK: http://wiki.apache.org/tomcat/ClaudiaRKK New page: I am 26 years old and my name is Claudia Trujillo.<>I life in Kling (Austria).<><>Here is my web site [[http://www.payasocabezon.com|mouse click the following website page]] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Update of "LocalBadContent" by ChuckCaldarale
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "LocalBadContent" page has been changed by ChuckCaldarale: http://wiki.apache.org/tomcat/LocalBadContent?action=diff&rev1=62&rev2=63 o-f\.com paisi\.com paisidesign\.com + payasocabezon\.com payrollservicesaustralia\.com pbali portedeurope\.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1421602 - in /tomcat/trunk/java: javax/websocket/RemoteEndpoint.java org/apache/tomcat/websocket/WsRemoteEndpoint.java
Author: markt Date: Thu Dec 13 22:56:06 2012 New Revision: 1421602 URL: http://svn.apache.org/viewvc?rev=1421602&view=rev Log: WebSocket 1.0 implementation part 15 of many Implement enough of the send message code that that WebSocket example works again using the new annotation endpoint Modified: tomcat/trunk/java/javax/websocket/RemoteEndpoint.java tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpoint.java Modified: tomcat/trunk/java/javax/websocket/RemoteEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/RemoteEndpoint.java?rev=1421602&r1=1421601&r2=1421602&view=diff == --- tomcat/trunk/java/javax/websocket/RemoteEndpoint.java (original) +++ tomcat/trunk/java/javax/websocket/RemoteEndpoint.java Thu Dec 13 22:56:06 2012 @@ -25,8 +25,18 @@ import java.util.concurrent.Future; public interface RemoteEndpoint { +/** + * Send the message, blocking until the message is sent. + * @param text The text message to send. + * @throws IOException + */ void sendString(String text) throws IOException; +/** + * Send the message, blocking until the message is sent. + * @param data The binary message to send + * @throws IOException + */ void sendBytes(ByteBuffer data) throws IOException; void sendPartialString(String fragment, boolean isLast) throws IOException; Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpoint.java?rev=1421602&r1=1421601&r2=1421602&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpoint.java Thu Dec 13 22:56:06 2012 @@ -20,6 +20,12 @@ import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.Charset; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CoderResult; +import java.util.concurrent.BrokenBarrierException; +import java.util.concurrent.CyclicBarrier; import java.util.concurrent.Future; import javax.servlet.ServletOutputStream; @@ -31,38 +37,83 @@ import javax.websocket.SendResult; public class WsRemoteEndpoint implements RemoteEndpoint { private final ServletOutputStream sos; +// Max length for outgoing WebSocket frame header is 10 bytes +private final ByteBuffer header = ByteBuffer.allocate(10); + +private final ByteBuffer textToByte = ByteBuffer.allocate(8192); +private final CharsetEncoder encoder = Charset.forName("UTF8").newEncoder(); +private volatile Boolean isText = null; +private volatile CyclicBarrier writeBarrier = new CyclicBarrier(2); + public WsRemoteEndpoint(ServletOutputStream sos) { this.sos = sos; } -public void onWritePossible() { -// TODO -} @Override public void sendString(String text) throws IOException { -// TODO Auto-generated method stub +if (isText != null) { +// Another message is being sent using fragments +// TODO i18n +throw new IllegalStateException(); +} +sendPartialString(text, true); } @Override public void sendBytes(ByteBuffer data) throws IOException { -// TODO Auto-generated method stub +if (isText != null) { +// Another message is being sent using fragments +// TODO i18n +throw new IllegalStateException(); +} +sendPartialBytes(data, true); } @Override public void sendPartialString(String fragment, boolean isLast) throws IOException { -// TODO Auto-generated method stub + +if (isText != null && !isText.booleanValue()) { +// Can't write a text fragment in the middle of a binary message +// TODO i18n +throw new IllegalStateException(); +} + +boolean first = (isText == null); +encoder.reset(); +textToByte.clear(); +CharBuffer cb = CharBuffer.wrap(fragment); +CoderResult cr = encoder.encode(cb, textToByte, true); +while (cr.isOverflow()) { +sendMessage(Constants.OPCODE_TEXT, textToByte, first, false); +first = false; +} +sendMessage(Constants.OPCODE_TEXT, textToByte, first, isLast); +if (!isLast) { +isText = Boolean.FALSE; +} } @Override public void sendPartialBytes(ByteBuffer partialByte, boolean isLast) throws IOException { -// TODO Auto-generated method stub + +if (isText != null && isText.booleanValue()) { +// Can't write a binary fragment in
[Tomcat Wiki] Trivial Update of "SalvatoreX" by SalvatoreX
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "SalvatoreX" page has been changed by SalvatoreX: http://wiki.apache.org/tomcat/SalvatoreX New page: Name: Salvatore Felix<>My age: 21<>Country: Australia<>City: Kulwin <>Post code: 2835<>Street: 8 Campbells River Road<><>Here is my web site ... [[http://hondaruckusforsale.org/|simply click the up coming article]] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Update of "LocalBadContent" by ChuckCaldarale
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "LocalBadContent" page has been changed by ChuckCaldarale: http://wiki.apache.org/tomcat/LocalBadContent?action=diff&rev1=63&rev2=64 hbgm\.cn hfire\.cn homepage\.mac\.com + hondaruckusforsale\.org honey99\.cn honey99\.com hungadir\.tigblog\.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org