JBossWeb SVN: r503 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-03-14 13:12:28 -0400 (Fri, 14 Mar 2008)
New Revision: 503
Added:
tags/JBOSSWEB_2_1_0_GA/
Log:
- JBoss Web 2.1.0.GA.
Copied: tags/JBOSSWEB_2_1_0_GA (from rev 502, trunk)
16 years, 2 months
JBossWeb SVN: r502 - trunk/bin.
by jbossweb-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-14 12:22:54 -0400 (Fri, 14 Mar 2008)
New Revision: 502
Modified:
trunk/bin/service.bat
Log:
Use jbossweb.exe as service executable name
Modified: trunk/bin/service.bat
===================================================================
--- trunk/bin/service.bat 2008-03-14 16:15:33 UTC (rev 501)
+++ trunk/bin/service.bat 2008-03-14 16:22:54 UTC (rev 502)
@@ -33,12 +33,12 @@
set CURRENT_DIR=%cd%
if not "%CATALINA_HOME%" == "" goto gotHome
set CATALINA_HOME=%cd%
-if exist "%CATALINA_HOME%\bin\jboss-web.exe" goto okHome
+if exist "%CATALINA_HOME%\bin\jbossweb.exe" goto okHome
rem CD to the upper dir
cd ..
set CATALINA_HOME=%cd%
:gotHome
-if exist "%CATALINA_HOME%\bin\jboss-web.exe" goto okHome
+if exist "%CATALINA_HOME%\bin\jbossweb.exe" goto okHome
echo The tomcat.exe was not found...
echo The CATALINA_HOME environment variable is not defined correctly.
echo This environment variable is needed to run this program
@@ -53,7 +53,7 @@
set CATALINA_BASE=%CATALINA_HOME%
:gotBase
-set EXECUTABLE=%CATALINA_HOME%\bin\jboss-web.exe
+set EXECUTABLE=%CATALINA_HOME%\bin\jbossweb.exe
rem Set default Service name
set SERVICE_NAME=JBossWeb
16 years, 2 months
JBossWeb SVN: r501 - in trunk/res/procrun: amd64 and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-14 12:15:33 -0400 (Fri, 14 Mar 2008)
New Revision: 501
Modified:
trunk/res/procrun/amd64/jbossweb.exe
trunk/res/procrun/amd64/jbosswebw.exe
trunk/res/procrun/ia64/jbossweb.exe
trunk/res/procrun/ia64/jbosswebw.exe
trunk/res/procrun/jbossweb.exe
trunk/res/procrun/jbosswebw.exe
Log:
Add Vista enabled binaries -- see r1437 of JBossNative
Modified: trunk/res/procrun/amd64/jbossweb.exe
===================================================================
(Binary files differ)
Modified: trunk/res/procrun/amd64/jbosswebw.exe
===================================================================
(Binary files differ)
Modified: trunk/res/procrun/ia64/jbossweb.exe
===================================================================
(Binary files differ)
Modified: trunk/res/procrun/ia64/jbosswebw.exe
===================================================================
(Binary files differ)
Modified: trunk/res/procrun/jbossweb.exe
===================================================================
(Binary files differ)
Modified: trunk/res/procrun/jbosswebw.exe
===================================================================
(Binary files differ)
16 years, 2 months
JBossWeb SVN: r500 - trunk/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-03-13 13:35:29 -0400 (Thu, 13 Mar 2008)
New Revision: 500
Modified:
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
Log:
- Use the proper timeout (cleanup, no functional impact).
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-03-13 16:50:02 UTC (rev 499)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-03-13 17:35:29 UTC (rev 500)
@@ -1279,14 +1279,14 @@
// An event is being processed already: adding for resume will be done
// when the socket gets back to the poller
if (!cometProcessing && !resumeNotification) {
- endpoint.getCometPoller().add(socket, timeout, false, false, true);
+ endpoint.getCometPoller().add(socket, cometTimeout, false, false, true);
}
resumeNotification = true;
} else if (actionCode == ActionCode.ACTION_COMET_WRITE) {
// An event is being processed already: adding for write will be done
// when the socket gets back to the poller
if (!cometProcessing && !writeNotification) {
- endpoint.getCometPoller().add(socket, timeout, false, true, false);
+ endpoint.getCometPoller().add(socket, cometTimeout, false, true, false);
}
writeNotification = true;
} else if (actionCode == ActionCode.ACTION_COMET_TIMEOUT) {
16 years, 2 months
JBossWeb SVN: r499 - trunk/java/org/apache/catalina/core.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-03-13 12:50:02 -0400 (Thu, 13 Mar 2008)
New Revision: 499
Modified:
trunk/java/org/apache/catalina/core/StandardWrapperValve.java
Log:
- Some Comet related components (like the tracking valve) need the session id, so make sure one is created
when starting a Comet connection. It's possible the behavior will change in the future.
Modified: trunk/java/org/apache/catalina/core/StandardWrapperValve.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardWrapperValve.java 2008-03-13 12:01:22 UTC (rev 498)
+++ trunk/java/org/apache/catalina/core/StandardWrapperValve.java 2008-03-13 16:50:02 UTC (rev 499)
@@ -214,6 +214,7 @@
SystemLogHandler.startCapture();
if (comet) {
request.setComet(true);
+ request.getSession(true);
filterChain.doFilterEvent(request.getEvent());
} else {
filterChain.doFilter(request.getRequest(),
@@ -228,6 +229,7 @@
} else {
if (comet) {
request.setComet(true);
+ request.getSession(true);
filterChain.doFilterEvent(request.getEvent());
} else {
filterChain.doFilter
16 years, 2 months
JBossWeb SVN: r498 - trunk/java/org/apache/tomcat/util/http.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-03-13 08:01:22 -0400 (Thu, 13 Mar 2008)
New Revision: 498
Modified:
trunk/java/org/apache/tomcat/util/http/ServerCookie.java
Log:
- Avoid quoting the path for v0 cookies.
Modified: trunk/java/org/apache/tomcat/util/http/ServerCookie.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2008-03-12 22:48:54 UTC (rev 497)
+++ trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2008-03-13 12:01:22 UTC (rev 498)
@@ -295,7 +295,12 @@
// Path=path
if (path!=null) {
buf.append ("; Path=");
- maybeQuote2(version, buf, path);
+ if (version > 0) {
+ // Don't quote the path for v0 cookies
+ maybeQuote2(version, buf, path);
+ } else {
+ buf.append(path);
+ }
}
// Secure
16 years, 2 months
JBossWeb SVN: r497 - trunk/java/org/apache/tomcat/util/net.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-03-12 18:48:54 -0400 (Wed, 12 Mar 2008)
New Revision: 497
Modified:
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Log:
- Some cleanups.
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2008-03-12 16:24:28 UTC (rev 496)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2008-03-12 22:48:54 UTC (rev 497)
@@ -467,7 +467,7 @@
if (poller == null) {
return 0;
} else {
- return poller.getConnectionsCount();
+ return poller.getConnectionCount();
}
}
@@ -1171,15 +1171,13 @@
pos = 0;
}
- public boolean add(long socket, int timeout, boolean read, boolean write, boolean resume) {
+ public boolean add(long socket, int timeout, int flag) {
if (size == sockets.length) {
return false;
} else {
sockets[size] = socket;
timeouts[size] = timeout;
- flags[size] = (read ? SocketInfo.READ : 0)
- | (write ? SocketInfo.WRITE : 0)
- | (resume ? SocketInfo.RESUME : 0);
+ flags[size] = flag;
size++;
return true;
}
@@ -1262,8 +1260,8 @@
/**
* Amount of connections inside this poller.
*/
- protected int connectionsCount = 0;
- public int getConnectionsCount() { return connectionsCount; }
+ protected int connectionCount = 0;
+ public int getConnectionCount() { return connectionCount; }
public Poller(boolean comet) {
this.comet = comet;
@@ -1317,7 +1315,7 @@
}
desc = new long[actualPollerSize * 2];
- connectionsCount = 0;
+ connectionCount = 0;
addList = new SocketList(pollerSize);
localAddList = new SocketList(pollerSize);
@@ -1362,7 +1360,7 @@
}
}
Pool.destroy(pool);
- connectionsCount = 0;
+ connectionCount = 0;
}
/**
@@ -1382,7 +1380,7 @@
synchronized (this) {
// Add socket to the list. Newly added sockets will wait
// at most for pollTime before being polled
- if (addList.add(socket, timeout, true, false, false)) {
+ if (addList.add(socket, timeout, SocketInfo.READ)) {
ok = true;
this.notify();
}
@@ -1420,7 +1418,8 @@
synchronized (this) {
// Add socket to the list. Newly added sockets will wait
// at most for pollTime before being polled
- if (addList.add(socket, timeout, read, write, resume)) {
+ if (addList.add(socket, timeout,
+ (read ? SocketInfo.READ : 0) | (write ? SocketInfo.WRITE : 0) | (resume ? SocketInfo.RESUME : 0))) {
ok = true;
this.notify();
}
@@ -1445,7 +1444,7 @@
rv = Poll.add(pollers[i], socket, events);
if (rv == Status.APR_SUCCESS) {
pollerSpace[i]--;
- connectionsCount++;
+ connectionCount++;
return true;
}
}
@@ -1463,7 +1462,7 @@
rv = Poll.remove(pollers[i], socket);
if (rv != Status.APR_NOTFOUND) {
pollerSpace[i]++;
- connectionsCount--;
+ connectionCount--;
break;
}
}
@@ -1499,6 +1498,7 @@
long maintainTime = 0;
// Loop until we receive a shutdown command
while (running) {
+
// Loop if endpoint is paused
while (paused) {
try {
@@ -1507,15 +1507,15 @@
// Ignore
}
}
-
- while (connectionsCount < 1 && addList.size() < 1) {
+ // Check timeouts for suspended connections if the poller is empty
+ while (connectionCount < 1 && addList.size() < 1) {
// Reset maintain time.
maintainTime = 1;
try {
synchronized (this) {
this.wait(10000);
}
- if (soTimeout > 0 && connectionsCount < 1 && addList.size() < 1 && running) {
+ if (soTimeout > 0 && connectionCount < 1 && addList.size() < 1 && running) {
maintain();
}
} catch (InterruptedException e) {
@@ -1591,7 +1591,7 @@
}
if (rv > 0) {
pollerSpace[i] += rv;
- connectionsCount -= rv;
+ connectionCount -= rv;
for (int n = 0; n < rv; n++) {
timeouts.remove(desc[n*2+1]);
// Check for failed sockets and hand this socket off to a worker
@@ -1599,8 +1599,10 @@
|| ((desc[n*2] & Poll.APR_POLLERR) == Poll.APR_POLLERR)
// Comet processes either a read or a write depending on what the poller returns
|| (comet &&
- (((desc[n*2] & Poll.APR_POLLIN) == Poll.APR_POLLIN) && !processSocket(desc[n*2+1], SocketStatus.OPEN_READ))
- || (((desc[n*2] & Poll.APR_POLLOUT) == Poll.APR_POLLOUT) && !processSocket(desc[n*2+1], SocketStatus.OPEN_WRITE)))
+ (((desc[n*2] & Poll.APR_POLLIN) == Poll.APR_POLLIN)
+ && !processSocket(desc[n*2+1], SocketStatus.OPEN_READ))
+ || (((desc[n*2] & Poll.APR_POLLOUT) == Poll.APR_POLLOUT)
+ && !processSocket(desc[n*2+1], SocketStatus.OPEN_WRITE)))
|| (!comet && !processSocket(desc[n*2+1]))) {
// Close socket and clear pool
if (comet) {
@@ -2014,7 +2016,7 @@
// Ignore
}
}
-
+ // Loop if poller is empty
while (sendfileCount < 1 && addS.size() < 1) {
// Reset maintain time.
maintainTime = 0;
16 years, 2 months
JBossWeb SVN: r496 - trunk/java/org/apache/tomcat/util/net.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-03-12 12:24:28 -0400 (Wed, 12 Mar 2008)
New Revision: 496
Modified:
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Log:
- Correctly update the individual poller space.
- Rename Poller.keepAliveCount and fix its updates (it is used to avoid loops when the poller is empty).
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2008-03-12 15:50:16 UTC (rev 495)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2008-03-12 16:24:28 UTC (rev 496)
@@ -467,7 +467,7 @@
if (poller == null) {
return 0;
} else {
- return poller.getKeepAliveCount();
+ return poller.getConnectionsCount();
}
}
@@ -1260,10 +1260,10 @@
protected SocketTimeouts timeouts = null;
/**
- * Amount of kept alive connections inside this poller.
+ * Amount of connections inside this poller.
*/
- protected int keepAliveCount = 0;
- public int getKeepAliveCount() { return keepAliveCount; }
+ protected int connectionsCount = 0;
+ public int getConnectionsCount() { return connectionsCount; }
public Poller(boolean comet) {
this.comet = comet;
@@ -1317,7 +1317,7 @@
}
desc = new long[actualPollerSize * 2];
- keepAliveCount = 0;
+ connectionsCount = 0;
addList = new SocketList(pollerSize);
localAddList = new SocketList(pollerSize);
@@ -1362,7 +1362,7 @@
}
}
Pool.destroy(pool);
- keepAliveCount = 0;
+ connectionsCount = 0;
}
/**
@@ -1445,6 +1445,7 @@
rv = Poll.add(pollers[i], socket, events);
if (rv == Status.APR_SUCCESS) {
pollerSpace[i]--;
+ connectionsCount++;
return true;
}
}
@@ -1462,6 +1463,7 @@
rv = Poll.remove(pollers[i], socket);
if (rv != Status.APR_NOTFOUND) {
pollerSpace[i]++;
+ connectionsCount--;
break;
}
}
@@ -1506,14 +1508,14 @@
}
}
- while (keepAliveCount < 1 && addList.size() < 1) {
+ while (connectionsCount < 1 && addList.size() < 1) {
// Reset maintain time.
maintainTime = 1;
try {
synchronized (this) {
this.wait(10000);
}
- if (soTimeout > 0 && keepAliveCount < 1 && addList.size() < 1 && running) {
+ if (soTimeout > 0 && connectionsCount < 1 && addList.size() < 1 && running) {
maintain();
}
} catch (InterruptedException e) {
@@ -1554,8 +1556,6 @@
} else {
Socket.destroy(info.socket);
}
- } else {
- keepAliveCount++;
}
}
} else {
@@ -1590,7 +1590,8 @@
rv = Poll.poll(pollers[i], pollerTime, desc, true);
}
if (rv > 0) {
- keepAliveCount -= rv;
+ pollerSpace[i] += rv;
+ connectionsCount -= rv;
for (int n = 0; n < rv; n++) {
timeouts.remove(desc[n*2+1]);
// Check for failed sockets and hand this socket off to a worker
16 years, 2 months
JBossWeb SVN: r495 - in trunk/java/org/apache/tomcat/util/net: res and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-03-12 11:50:16 -0400 (Wed, 12 Mar 2008)
New Revision: 495
Modified:
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
Log:
- Fix an obvious bug in duplicate after the last refactoring (which I hadn't tested).
- Improve the add methods (doing operations with syncs is wrong).
- Some cleanups.
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2008-03-12 15:00:12 UTC (rev 494)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2008-03-12 15:50:16 UTC (rev 495)
@@ -1190,7 +1190,7 @@
copy.pos = pos;
System.arraycopy(sockets, 0, copy.sockets, 0, size);
System.arraycopy(timeouts, 0, copy.timeouts, 0, size);
- System.arraycopy(flags, 0, copy.timeouts, 0, size);
+ System.arraycopy(flags, 0, copy.flags, 0, size);
}
}
@@ -1378,20 +1378,23 @@
if (timeout < 0) {
timeout = soTimeout;
}
+ boolean ok = false;
synchronized (this) {
// Add socket to the list. Newly added sockets will wait
// at most for pollTime before being polled
- if (!addList.add(socket, timeout, true, false, false)) {
- // Can't do anything: close the socket right away
- if (comet) {
- processSocket(socket, SocketStatus.ERROR);
- } else {
- Socket.destroy(socket);
- }
- return;
+ if (addList.add(socket, timeout, true, false, false)) {
+ ok = true;
+ this.notify();
}
- this.notify();
}
+ if (!ok) {
+ // Can't do anything: close the socket right away
+ if (comet) {
+ processSocket(socket, SocketStatus.ERROR);
+ } else {
+ Socket.destroy(socket);
+ }
+ }
}
/**
@@ -1413,20 +1416,23 @@
if (timeout < 0) {
timeout = soTimeout;
}
+ boolean ok = false;
synchronized (this) {
// Add socket to the list. Newly added sockets will wait
// at most for pollTime before being polled
- if (!addList.add(socket, timeout, read, write, resume)) {
- // Can't do anything: close the socket right away
- if (comet) {
- processSocket(socket, SocketStatus.ERROR);
- } else {
- Socket.destroy(socket);
- }
- return;
+ if (addList.add(socket, timeout, read, write, resume)) {
+ ok = true;
+ this.notify();
}
- this.notify();
}
+ if (!ok) {
+ // Can't do anything: close the socket right away
+ if (comet) {
+ processSocket(socket, SocketStatus.ERROR);
+ } else {
+ Socket.destroy(socket);
+ }
+ }
}
/**
@@ -1539,14 +1545,8 @@
if (comet) {
removeFromPoller(info.socket);
}
- // Windows only: check status code and loop over the other pollers
- int events = 0;
- if (info.read()) {
- events = Poll.APR_POLLIN;
- }
- if (info.write()) {
- events = events | Poll.APR_POLLOUT;
- }
+ int events = ((info.read()) ? Poll.APR_POLLIN : 0)
+ | ((info.write()) ? Poll.APR_POLLOUT : 0);
if (!addToPoller(info.socket, events)) {
// Can't do anything: close the socket right away
if (comet) {
Modified: trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
===================================================================
--- trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties 2008-03-12 15:00:12 UTC (rev 494)
+++ trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties 2008-03-12 15:50:16 UTC (rev 495)
@@ -18,7 +18,6 @@
endpoint.poll.limitedpollsize=Failed to create poller with specified size of {0}
endpoint.poll.initfail=Poller creation failed
endpoint.poll.fail=Critical poller failure (restarting poller): [{0}] {1}
-endpoint.poll.fail=Socket [{0}] poll event: [{1}] {2}
endpoint.poll.error=Unexpected poller error
endpoint.maintain.error=Error processing timeouts
endpoint.process.fail=Error allocating socket processor
16 years, 2 months
JBossWeb SVN: r494 - sandbox/webapps/src.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-03-12 11:00:12 -0400 (Wed, 12 Mar 2008)
New Revision: 494
Modified:
sandbox/webapps/src/BigField.java
sandbox/webapps/src/TestFilter.java
Log:
It is not possible to read the parameter and use The InputStream of getInputStream().
Modified: sandbox/webapps/src/BigField.java
===================================================================
--- sandbox/webapps/src/BigField.java 2008-03-12 14:29:56 UTC (rev 493)
+++ sandbox/webapps/src/BigField.java 2008-03-12 15:00:12 UTC (rev 494)
@@ -48,7 +48,7 @@
out.println("<body>");
out.println("<head>");
- String title = "big input field via POST";
+ String title = "big input field via " + request.getMethod();;
out.println("<title>" + title + "</title>");
out.println("</head>");
out.println("<body bgcolor=\"white\">");
@@ -62,6 +62,8 @@
// addition of a PathInfo issue
out.println("<h3>" + title + "</h3>");
+
+/* It is not possible to read the parameter and use The InputStream of getInputStream().
String firstName = request.getParameter("firstname");
String lastName = request.getParameter("lastname");
if (firstName != null || lastName != null) {
@@ -77,6 +79,7 @@
}
}
out.println("<P>");
+ */
/*
// ObjectInputStream.
@@ -116,6 +119,12 @@
} else {
out.println("No input");
}
+
+ /* Try to read a user certificate */
+ Object object = request.getAttribute("javax.servlet.request.X509Certificate");
+ if (object != null)
+ out.println("<P> Has a javax.servlet.request.X509Certificate </P>");
+
/* read */
out.println("<P>");
Modified: sandbox/webapps/src/TestFilter.java
===================================================================
--- sandbox/webapps/src/TestFilter.java 2008-03-12 14:29:56 UTC (rev 493)
+++ sandbox/webapps/src/TestFilter.java 2008-03-12 15:00:12 UTC (rev 494)
@@ -73,7 +73,12 @@
chain.doFilter(request, response);
return;
}
+ if (path.compareTo("/BigField") == 0) {
+ chain.doFilter(request, response);
+ return;
+ }
+
// get action
String action = req.getParameter("do");
if (action == null) {
16 years, 2 months