yet another tomcat goes stable and I still have to make a custom package

2006-03-21 Thread Haroon Rafique

Dear Tomcat Developers,

I noticed that 5.5.16 has beeen voted as stable (no major issues) on March 
15th. To deploy this release in production I will have to make a custom 
distribution (yet once again). The reason for this is that a simple bug in 
ManagerServlet (reported by myself) has still not been fixed. Before I can 
deploy a vanilla release to production, I need to have this bug committed. 
I reported this bug 36847 in the tomcat 5.5.9 days (2005-09-28) and I also 
did the analysis and provided a patch.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36847

Would a tomcat developer be kind enough to take a look at the bug and 
commit it, so that it makes it into the next stable release? I have sent 
reminder emails before but have gotten no response. Is there anything else 
I can do?


Thanks In Advance,
--
Haroon Rafique
<[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Workaround on org.apache.catalina.realm.DataSourceRealm

2006-03-21 Thread Hiro IGARASHI
Dear Developers,

# I'm new to this list and I'm Japanese.  So please forgive me my broken
English.

I'm using tomcat 5.5 bundled in JBoss-4.0.3SP1.  And I tried using
org.apache.catalina.realm.DataSourceRealm for container managed
authorization. But it didn't work as I expected.
Then I made a workaround, let me report this.



I followed an instruction on
http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#DataSourceRealm, it
didn't work on my environment, which throws an exception as follows,
-
006-03-22 00:06:12,423 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web]] Exception performing
authentication
java.lang.NullPointerException
at
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
at
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:
282)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthent
icator.java:256)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:391)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
59)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre
ad.java:112)
at java.lang.Thread.run(Thread.java:595)
-


As I read source codes around DataSourceRealm.java and watched behavior, I
found that StandardServer.getGlobalNamingContext() always returns null on my
environment.  And there're no lines which put any instance of NamingContext
into the attribute StandardServer.globalNamingContext as far as I trace a
behavior of DataSourceRealm object.  I don't know whether this is a bug of
the StandardServer object or a bug of cooperation with JBoss.

Anyways, I modified DataSourceRealm.open() as follows,
-
protected Connection open() {
try {
Context context = null;
if (localDataSource) {
context = ContextBindings.getClassLoader();
context = (Context) context.lookup("comp/env");
} else {
StandardServer server = 
(StandardServer) ServerFactory.getServer();
context = server.getGlobalNamingContext();
}

//added by hiro from here
if( context == null ){
context = new javax.naming.InitialContext();
context = (Context)context.lookup("java:/");
}
// added by hiro till here

DataSource dataSource =
(DataSource)context.lookup(dataSourceName);
  <>
-

I think this workaround is not an essential one but it works as I expect.
It's my pleasure if this workaround helps you.

Sincerely,
--igarashi
Hiro IGARASHI
TEL: +81.3.3595.2900   FAX: +81.3.3595.2903
SimDesk Technologies, Inc.
Senior Engineer



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39039] - dispatcher.include cannot match request to existing session

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39039


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME




--- Additional Comments From [EMAIL PROTECTED]  2006-03-21 14:53 ---
Turns out Tomcat can pass into filter requests which have no sessions 
associated to them.  When calling dispatcher.include you must use a request 
that had a session assigned.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



quick fix to be able to run configure on freebsd 6.0

2006-03-21 Thread Tomas Klockar

Hello,
this change makes it possible to run configure on freebsd 6.x
---8<8<---8<
golf# pwd
/usr/local/tomcat5.5/bin/jsvc-src
golf# diff configure configure.old
2412,2416d2411
<   freebsd6.?)
< CFLAGS="$CFLAGS -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread"
< LDFLAGS="-pthread $LDFLAGS"
< supported_os="freebsd"
< ;;
-8<--8<8<-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Removing dates from localhost log file

2006-03-21 Thread Davidian

Is it possible to remove the line that includes the date/time that appears in
the localhost- log file?

This information is written every other line, and in our software, it just
gets in the way.  Here is an example of the line I am referring to:

Mar 21, 2006 3:08:08 AM org.apache.catalina.core.ApplicationContext log

I've looked at the logging.properties files, and associated documentation,
but I don't see anything about this.

Thank you in advance.
--
View this message in context: 
http://www.nabble.com/Removing-dates-from-localhost-log-file-t1317556.html#a3513080
Sent from the Tomcat - Dev forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Removing dates from localhost log file

2006-03-21 Thread Yoav Shapira
Hi,
This belongs on the tomcat user mailing list, users@tomcat.apache.org,
not this one.  Please continue the discussion there, not here.

To remove the date/times you need to specify a formatting pattern in
logging.properties that does not include date/time.  The exact syntax
of the pattern depends on which logging implementation you're using,
e.g. log4j or java.util.logging.  If you're using log4j, see the
JavaDocs for org.apache.log4j.PatternLayout: any pattern without %d
will work.  If you're using java.util.logging, I'm not sure where
exactly the pattern options are.

Yoav

On 3/21/06, Davidian <[EMAIL PROTECTED]> wrote:
>
> Is it possible to remove the line that includes the date/time that appears in
> the localhost- log file?
>
> This information is written every other line, and in our software, it just
> gets in the way.  Here is an example of the line I am referring to:
>
> Mar 21, 2006 3:08:08 AM org.apache.catalina.core.ApplicationContext log
>
> I've looked at the logging.properties files, and associated documentation,
> but I don't see anything about this.
>
> Thank you in advance.
> --
> View this message in context: 
> http://www.nabble.com/Removing-dates-from-localhost-log-file-t1317556.html#a3513080
> Sent from the Tomcat - Dev forum at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387554 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

2006-03-21 Thread remm
Author: remm
Date: Tue Mar 21 07:49:50 2006
New Revision: 387554

URL: http://svn.apache.org/viewcvs?rev=387554&view=rev
Log:
- Apparently some OSes can also use EINTR as a semi normal result.
- Harmonize sendfile poller handling.

Modified:

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=387554&r1=387553&r2=387554&view=diff
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
Tue Mar 21 07:49:50 2006
@@ -1076,9 +1076,9 @@
 getWorkerThread().assign(desc[n*2+1]);
 }
 } else if (rv < 0) {
-/* Any non timeup error is critical */
-if (-rv != Status.TIMEUP) {
-int errn = -rv;
+int errn = -rv;
+/* Any non timeup or interrupted error is critical */
+if ((errn != Status.TIMEUP) && (errn != Status.EINTR)) 
{
 if (errn >  Status.APR_OS_START_USERERR) {
errn -=  Status.APR_OS_START_USERERR;
 }
@@ -1088,6 +1088,7 @@
 destroy();
 init();
 }
+continue;
 }
 }
 if (soTimeout > 0 && maintainTime > 100L) {
@@ -1470,16 +1471,19 @@
 }
 }
 } else if (rv < 0) {
-/* Any non timeup error is critical */
-if (-rv == Status.TIMEUP)
-rv = 0;
-else {
-log.error(sm.getString("endpoint.poll.fail", "" + 
(-rv), Error.strerror(-rv)));
+int errn = -rv;
+/* Any non timeup or interrupted error is critical */
+if ((errn != Status.TIMEUP) && (errn != Status.EINTR)) 
{
+if (errn >  Status.APR_OS_START_USERERR) {
+errn -=  Status.APR_OS_START_USERERR;
+}
+log.error(sm.getString("endpoint.poll.fail", "" + 
errn, Error.strerror(errn)));
 // Handle poll critical failure
 synchronized (this) {
 destroy();
 init();
 }
+continue;
 }
 }
 /* TODO: See if we need to call the maintain for sendfile 
poller */



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387560 - in /tomcat/container/tc5.5.x/modules/groupcom: ./ src/share/org/apache/catalina/tribes/ src/share/org/apache/catalina/tribes/group/interceptors/ src/share/org/apache/catalina/tri

2006-03-21 Thread fhanik
Author: fhanik
Date: Tue Mar 21 08:07:12 2006
New Revision: 387560

URL: http://svn.apache.org/viewcvs?rev=387560&view=rev
Log:
Added documentation for the ReplicatedMapEntry and added the async replication 
to the demos

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/util/FastQueue.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMap.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java

tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/ChannelCreator.java

tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/LoadTest.java

tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/MapDemo.java
tomcat/container/tc5.5.x/modules/groupcom/to-do.txt

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java?rev=387560&r1=387559&r2=387560&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
 Tue Mar 21 08:07:12 2006
@@ -72,6 +72,15 @@
 public int getOptions();
 public void setOptions(int options);
 
+/**
+ * Shallow clone, only the actual message(getMessage()) is cloned, the 
rest remains as references
+ * @return ChannelMessage
+ */
 public ChannelMessage clone();
 
+/**
+ * Deep clone, everything gets cloned
+ * @return ChannelMessage
+ */
+public ChannelMessage deepclone();
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=387560&r1=387559&r2=387560&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 Tue Mar 21 08:07:12 2006
@@ -15,6 +15,8 @@
 
 package org.apache.catalina.tribes.group.interceptors;
 
+import java.util.concurrent.atomic.AtomicLong;
+
 import org.apache.catalina.tribes.Channel;
 import org.apache.catalina.tribes.ChannelException;
 import org.apache.catalina.tribes.ChannelMessage;
@@ -23,7 +25,6 @@
 import org.apache.catalina.tribes.group.InterceptorPayload;
 import org.apache.catalina.tribes.tcp.bio.util.FastQueue;
 import org.apache.catalina.tribes.tcp.bio.util.LinkObject;
-import java.util.concurrent.atomic.AtomicLong;
 
 /**
  *
@@ -44,22 +45,23 @@
 private boolean run = false;
 private Thread msgDispatchThread = null;
 private AtomicLong currentSize = new AtomicLong(0);
-
+private boolean useDeepClone = false;
 
 public void sendMessage(Member[] destination, ChannelMessage msg, 
InterceptorPayload payload) throws ChannelException {
 boolean async = (msg.getOptions() & Channel.SEND_OPTIONS_ASYNCHRONOUS) 
== Channel.SEND_OPTIONS_ASYNCHRONOUS;
 if ( async && run ) {
 if ( (currentSize.get()+msg.getMessage().getLength()) > 
maxQueueSize ) throw new ChannelException("Asynchronous queue is full, reached 
its limit of "+maxQueueSize+" bytes, current:"+currentSize+" bytes.");
 //add to queue
-queue.add(msg, destination, payload);
+if ( useDeepClone ) msg = msg.deepclone();
+if (!queue.add(msg, destination, payload) ) {
+throw new ChannelException("Unable to add the message to the 
async queue, queue bug?");
+}
 currentSize.addAndGet(msg.getMessage().getLength());
 } else {
 super.sendMessage(destination, msg, payload);
 }
 }
 
-
-
 public void messageReceived(ChannelMessage msg) {
 super.messageReceived(msg);
 }
@@ -78,10 +

svn commit: r387567 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java

2006-03-21 Thread fhanik
Author: fhanik
Date: Tue Mar 21 08:12:56 2006
New Revision: 387567

URL: http://svn.apache.org/viewcvs?rev=387567&view=rev
Log:
added in proper locking to the ReplicatedMapEntry

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=387567&r1=387566&r2=387567&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
 Tue Mar 21 08:12:56 2006
@@ -201,15 +201,20 @@
 boolean diff = ( (value instanceof ReplicatedMapEntry) && ( 
(ReplicatedMapEntry) value).isDiffable());
 MapMessage msg = null;
 if (diff) {
+ReplicatedMapEntry rentry = 
(ReplicatedMapEntry)entry.getValue();
 try {
+rentry.lock();
 //construct a diff message
 msg = new MapMessage(mapContextName, MapMessage.MSG_BACKUP,
  true, (Serializable) entry.getKey(), 
null,
- ( (ReplicatedMapEntry) 
entry.getValue()).getDiff(),
+ rentry.getDiff(),
  entry.getBackupNodes());
 } catch (IOException x) {
 log.error("Unable to diff object. Will replicate the 
entire object instead.", x);
+} finally {
+rentry.unlock();
 }
+
 }
 if (msg == null) {
 //construct a complete
@@ -387,9 +392,12 @@
 ReplicatedMapEntry diff = (ReplicatedMapEntry) 
entry.getValue();
 if (mapmsg.isDiff()) {
 try {
+diff.lock();
 diff.applyDiff(mapmsg.getDiffValue(), 0, 
mapmsg.getDiffValue().length);
 } catch (Exception x) {
 log.error("Unable to apply diff to key:" + 
entry.getKey(), x);
+} finally {
+diff.unlock();
 }
 } else {
 entry.setValue(mapmsg.getValue());
@@ -522,7 +530,8 @@
 }
 
 public boolean isDiffable() {
-return (value instanceof ReplicatedMapEntry);
+return (value instanceof ReplicatedMapEntry) &&
+   ((ReplicatedMapEntry)value).isDiffable();
 }
 
 public void setBackupNodes(Member[] nodes) {
@@ -583,7 +592,13 @@
  */
 public void apply(byte[] data, int offset, int length, boolean diff) 
throws IOException, ClassNotFoundException {
 if (isDiffable() && diff) {
-( (ReplicatedMapEntry) value).applyDiff(data, offset, length);
+ReplicatedMapEntry rentry = (ReplicatedMapEntry) value;
+try {
+rentry.lock();
+rentry.applyDiff(data, offset, length);
+} finally {
+rentry.unlock();
+}
 } else if (length == 0) {
 value = null;
 proxy = true;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387568 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java

2006-03-21 Thread fhanik
Author: fhanik
Date: Tue Mar 21 08:14:13 2006
New Revision: 387568

URL: http://svn.apache.org/viewcvs?rev=387568&view=rev
Log:
Added a default queue size

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=387568&r1=387567&r2=387568&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 Tue Mar 21 08:14:13 2006
@@ -40,7 +40,7 @@
 public class MessageDispatchInterceptor extends ChannelInterceptorBase 
implements Runnable {
 private static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(MessageDispatchInterceptor.class);
 
-private long maxQueueSize;
+private long maxQueueSize = 1024*1024*64; //64MB
 private FastQueue queue = new FastQueue();
 private boolean run = false;
 private Thread msgDispatchThread = null;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39048] New: - Unable to run the Examples from the Welcome page

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39048

   Summary: Unable to run the Examples from the Welcome page
   Product: Tomcat 5
   Version: Unknown
  Platform: PC
OS/Version: Windows 2000
Status: NEW
  Severity: normal
  Priority: P2
 Component: Webapps:Examples
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


I am a newbie in Tomcat.

I installed Tomcat 5.5.16 on 2 different PC using the Windows .exe file I
downloaded from Tomcat's website.

On these two machines, I asked for http://localhost:8080 and the page was
correctly displayed. The links to Servlets and JSP examples were not working
properly. The error message indicated that Tomcat could not find the files (or
something like that, sorry ...)

I uninstalled the 5.5.16 release and replaced it with the 5.0.28 release and
those links are working now.

Note that if I used an alpha or beta version, it was not mentioned on the
website when I downloaded it.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387569 - in /tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha: ./ session/ tcp/

2006-03-21 Thread fhanik
Author: fhanik
Date: Tue Mar 21 08:15:21 2006
New Revision: 387569

URL: http://svn.apache.org/viewcvs?rev=387569&view=rev
Log:
The DeltaSession now implements ReplicatedMapEntry, so it can be used in the 
LazyReplicatedMap scenario

Modified:

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/ClusterManager.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/ClusterManagerBase.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaManager.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaRequest.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/SerializablePrincipal.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/tcp/SimpleTcpCluster.java

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/ClusterManager.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/ClusterManager.java?rev=387569&r1=387568&r2=387569&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/ClusterManager.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/ClusterManager.java
 Tue Mar 21 08:15:21 2006
@@ -18,6 +18,8 @@
 
 
 import org.apache.catalina.Manager;
+import java.io.IOException;
+import org.apache.catalina.tribes.io.ReplicationStream;
 
 
 /**
@@ -98,4 +100,11 @@
 * @since 5.5.10
 */
public boolean isDefaultMode();
+   
+   public ReplicationStream getReplicationStream(byte[] data) throws 
IOException;
+
+   public ReplicationStream getReplicationStream(byte[] data, int offset, int 
length) throws IOException;
+   
+   public boolean isNotifyListenersOnReplication();
+
 }

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/ClusterManagerBase.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/ClusterManagerBase.java?rev=387569&r1=387568&r2=387569&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/ClusterManagerBase.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/ClusterManagerBase.java
 Tue Mar 21 08:15:21 2006
@@ -41,6 +41,10 @@
  * @throws IOException
  */
 public ReplicationStream getReplicationStream(byte[] data) throws 
IOException {
+return getReplicationStream(data,0,data.length);
+}
+
+public ReplicationStream getReplicationStream(byte[] data, int offset, int 
length) throws IOException {
 ByteArrayInputStream fis =null;
 ReplicationStream ois = null;
 Loader loader = null;
@@ -55,7 +59,7 @@
 else
 classLoader = Thread.currentThread().getContextClassLoader();
 //end fix
-fis = new ByteArrayInputStream(data);
+fis = new ByteArrayInputStream(data,offset,length);
 if ( classLoader == Thread.currentThread().getContextClassLoader() ) {
 ois = new ReplicationStream(fis, new ClassLoader[] {classLoader});
 } else {

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaManager.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaManager.java?rev=387569&r1=387568&r2=387569&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaManager.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaManager.java
 Tue Mar 21 08:15:21 2006
@@ -611,7 +611,7 @@
  * @throws ClassNotFoundException
  * @throws IOException
  */
-protected DeltaRequest loadDeltaRequest(DeltaSession session, byte[] data) 
throws ClassNotFoundException, IOException {
+protected DeltaRequest deserializeDeltaRequest(DeltaSession session, 
byte[] data) throws ClassNotFoundException, IOException {
 ReplicationStream ois = getReplicationStream(data);
 session.getDeltaRequest().readExternal(ois);
 ois.close();
@@ -626,13 +626,8 @@
  * @return serialized delta request
  * @throws IOException
  */
-protected byte[] unloadDeltaRequest(DeltaRequest deltaRequest) throws 
IOException {
-ByteArrayOutputStream bos = new ByteArrayOutputStream();
-ObjectOutputStream oos = new ObjectOutputStr

DO NOT REPLY [Bug 39048] - Unable to run the Examples from the Welcome page

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39048


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Additional Comments From [EMAIL PROTECTED]  2006-03-21 16:19 ---


*** This bug has been marked as a duplicate of 39041 ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39041] - Corrupt .class files in .exe distribution.

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39041


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2006-03-21 16:19 ---
*** Bug 39048 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387572 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml

2006-03-21 Thread remm
Author: remm
Date: Tue Mar 21 08:21:02 2006
New Revision: 387572

URL: http://svn.apache.org/viewcvs?rev=387572&view=rev
Log:
- Changelog update.

Modified:
tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=387572&r1=387571&r2=387572&view=diff
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Mar 21 08:21:02 2006
@@ -15,6 +15,13 @@
 
 
 
+  
+
+  
+Update to Xerces 2.8.0 (remm)
+  
+
+  
   
 
   
@@ -32,6 +39,16 @@
   
 38761: Handle relative symlinks to shell scripts as 
suggested by Adam Murray (keith)
   
+  
+38795: Associate more closely bind with a finally unbind in 
StandardContext start and
+stop, based on a patch by Darryl Miles (remm)
+  
+  
+Improve undeployment robustness (remm)
+  
+  
+Expand the semaphore valve (remm)
+  
 
   
   
@@ -41,6 +58,14 @@
 suites enabled by default rather than the set of all cipher suites. 
This prevents
 ciphers suites that do not provide confidentiality protection and/or 
server
 authentication being used by default. (markt)
+  
+  
+Move AprEndpoint.getWorkerThread inside the try/catch for the main 
accept loop, to guard
+about an OOM (which would most likely doom the server anyway) (remm)
+  
+  
+As exhibited in the ASF's JIRA installation, it seems EINTR is a 
status code that should
+be ignored as a result to a poll call (remm)
   
 
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387573 - /tomcat/connectors/trunk/jni/README.txt

2006-03-21 Thread jfclere
Author: jfclere
Date: Tue Mar 21 08:22:49 2006
New Revision: 387573

URL: http://svn.apache.org/viewcvs?rev=387573&view=rev
Log:
Add a note how to build the native (dynamic library) part.

Modified:
tomcat/connectors/trunk/jni/README.txt

Modified: tomcat/connectors/trunk/jni/README.txt
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/README.txt?rev=387573&r1=387572&r2=387573&view=diff
==
--- tomcat/connectors/trunk/jni/README.txt (original)
+++ tomcat/connectors/trunk/jni/README.txt Tue Mar 21 08:22:49 2006
@@ -4,6 +4,7 @@
 Building
 
 ant
+To build the native part see native/BUILDING
 
 Running the examples
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: yet another tomcat goes stable and I still have to make a custom package

2006-03-21 Thread Yoav Shapira
Hi,
The reason your patch hasn't been applied yet (or at least, the reason
I haven't applied it yet, and I have looked at it once your twice) is
that I'm sure the copy operation you remove is really redundant in all
cases.

The copy operation seems to have been added as part of revision 303270
committed on Thu Sep 23 07:03:27 2004 UTC by Remy.  It's been nearly a
year and half since then, with no complaints about this code except
yours, so it seems to work for the majority of users.  Accordingly,
before we go and apply your patch, we'd need to be convinced that it
doesn't introduce a regression failure.

For reference, Remy's commit notes on the patch read:
- Fix some deprecation warnings.
- Fix bug 31264: deploy should now behave correctly. Also move the
writing of the WAR inside the isServiced block, so that if the
uploading takes time, the auto deployer doesn't try to deploy it.
- Add any deployment operation inside a try/finally block so that
serviced is set back to false for the management operation, regardless
of what occurs. There shouldn't be any unexpected exceptions thrown
out there, but any problem would prevent further management of the
application.

Yoav


On 3/21/06, Haroon Rafique <[EMAIL PROTECTED]> wrote:
> Dear Tomcat Developers,
>
> I noticed that 5.5.16 has beeen voted as stable (no major issues) on March
> 15th. To deploy this release in production I will have to make a custom
> distribution (yet once again). The reason for this is that a simple bug in
> ManagerServlet (reported by myself) has still not been fixed. Before I can
> deploy a vanilla release to production, I need to have this bug committed.
> I reported this bug 36847 in the tomcat 5.5.9 days (2005-09-28) and I also
> did the analysis and provided a patch.
> http://issues.apache.org/bugzilla/show_bug.cgi?id=36847
>
> Would a tomcat developer be kind enough to take a look at the bug and
> commit it, so that it makes it into the next stable release? I have sent
> reminder emails before but have gotten no response. Is there anything else
> I can do?
>
> Thanks In Advance,
> --
> Haroon Rafique
> <[EMAIL PROTECTED]>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Broken link

2006-03-21 Thread Tomas Klockar

On the status page for apache tomcat
http://tomcat.apache.org/tomcat-5.5-doc/status.html
the link to the open bugs at the bottem of the page is broken.

regards

/Tomas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387590 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java

2006-03-21 Thread fhanik
Author: fhanik
Date: Tue Mar 21 09:55:07 2006
New Revision: 387590

URL: http://svn.apache.org/viewcvs?rev=387590&view=rev
Log:
In order to make this manager extendable, it should not assume the class of the 
session

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java?rev=387590&r1=387589&r2=387590&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java
 Tue Mar 21 09:55:07 2006
@@ -671,7 +671,7 @@
 // Expire all active sessions
 Session sessions[] = findSessions();
 for (int i = 0; i < sessions.length; i++) {
-StandardSession session = (StandardSession) sessions[i];
+Session session = sessions[i];
 try {
 if (session.isValid()) {
 session.expire();



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r387590 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java

2006-03-21 Thread Filip Hanik - Dev Lists

everyone kosher with this change?

Filip

[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Tue Mar 21 09:55:07 2006
New Revision: 387590

URL: http://svn.apache.org/viewcvs?rev=387590&view=rev
Log:
In order to make this manager extendable, it should not assume the class of the 
session

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java?rev=387590&r1=387589&r2=387590&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java
 Tue Mar 21 09:55:07 2006
@@ -671,7 +671,7 @@
 // Expire all active sessions
 Session sessions[] = findSessions();
 for (int i = 0; i < sessions.length; i++) {
-StandardSession session = (StandardSession) sessions[i];
+Session session = sessions[i];
 try {
 if (session.isValid()) {
 session.expire();



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387596 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/group/interceptors/ src/share/org/apache/catalina/tribes/tcp/nio/ src/share/org/apache/catalin

2006-03-21 Thread fhanik
Author: fhanik
Date: Tue Mar 21 10:18:15 2006
New Revision: 387596

URL: http://svn.apache.org/viewcvs?rev=387596&view=rev
Log:
Fixed deadlock in the RPC channel, responses can not be sent with ACK, cause 
everyone ends up waiting for ACKs

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcChannel.java

tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/MapDemo.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=387596&r1=387595&r2=387596&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 Tue Mar 21 10:18:15 2006
@@ -62,20 +62,6 @@
 }
 }
 
-public void messageReceived(ChannelMessage msg) {
-super.messageReceived(msg);
-}
-
-public void memberAdded(Member member) {
-//todo, nothing
-super.memberAdded(member);
-}
-
-public void memberDisappeared(Member member) {
-super.memberDisappeared(member);
-//clean up existing queue items
-}
-
 public void setMaxQueueSize(long maxQueueSize) {
 this.maxQueueSize = maxQueueSize;
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java?rev=387596&r1=387595&r2=387596&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
 Tue Mar 21 10:18:15 2006
@@ -64,6 +64,9 @@
 protected XByteBuffer ackbuf = new XByteBuffer(128,true);
 protected int remaining = 0;
 protected boolean complete;
+
+protected boolean connecting = false;
+
 public NioSender(Member destination) throws UnknownHostException {
 super(destination);
 
@@ -82,6 +85,7 @@
 if ( socketChannel.finishConnect() ) {
 //we connected, register ourselves for writing
 setConnected(true);
+connecting = false;
 setRequestCount(0);
 setConnectTime(System.currentTimeMillis());
 socketChannel.socket().setSendBufferSize(getTxBufSize());
@@ -143,7 +147,10 @@
 ackbuf.append(readbuf,read);
 readbuf.clear();
 if (ackbuf.doesPackageExist() ) {
-return 
Arrays.equals(ackbuf.extractDataPackage(true),org.apache.catalina.tribes.tcp.Constants.ACK_DATA);
+System.out.print("Reading ack:");
+boolean result = 
Arrays.equals(ackbuf.extractDataPackage(true),org.apache.catalina.tribes.tcp.Constants.ACK_DATA);
+System.out.println(result);
+return result;
 } else {
 return false;
 }
@@ -183,6 +190,8 @@
  * @todo Implement this org.apache.catalina.tribes.tcp.IDataSender method
  */
 public synchronized void connect() throws IOException {
+if ( connecting ) return;
+connecting = true;
 if ( isConnected() ) throw new IOException("NioSender is already in 
connected state.");
 if ( readbuf == null ) {
 readbuf = getReadBuffer();
@@ -205,16 +214,20 @@
  */
 public void disconnect() {
 try {
+connecting = false;
 setConnected(false);
 if ( socketChannel != null ) {
-Socket socket = socketChannel.socket();
-//error free close, all the way
-try {socket.shutdownOutput();}catch ( Exception x){}
-try {socket.shutdownInput();}catch ( Exception x){}
-try {socket.close();}catch ( Exception x){}
-try {socketChannel.close();}catch ( Exception x){}
-socket = null;
-socketChannel = null;
+try {
+Socket socket = socketChannel.socket();
+//error free close, all the way
+   

Re: svn commit: r387590 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java

2006-03-21 Thread Remy Maucherat

Filip Hanik - Dev Lists wrote:

everyone kosher with this change?


I like it.

I also remember you agreed a million years ago that the clustering 
session(s) implementation(s) should extend StandardSession (hehe).


Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387597 - /tomcat/connectors/trunk/jni/native/src/network.c

2006-03-21 Thread jim
Author: jim
Date: Tue Mar 21 10:21:28 2006
New Revision: 387597

URL: http://svn.apache.org/viewcvs?rev=387597&view=rev
Log:
Now that we are doing this in AprEndpoint, no need to
force it here.

Modified:
tomcat/connectors/trunk/jni/native/src/network.c

Modified: tomcat/connectors/trunk/jni/native/src/network.c
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/src/network.c?rev=387597&r1=387596&r2=387597&view=diff
==
--- tomcat/connectors/trunk/jni/native/src/network.c (original)
+++ tomcat/connectors/trunk/jni/native/src/network.c Tue Mar 21 10:21:28 2006
@@ -386,15 +386,7 @@
 UNREFERENCED_STDARGS;
 TCN_ASSERT(sock != 0);
 TCN_ASSERT(s->sock != NULL);
-#if !defined(WIN32)
-apr_socket_opt_set(s->sock, APR_SO_REUSEADDR, 1);
-#endif
 rv = (jint)apr_socket_bind(s->sock, a);
-#if defined(WIN32)
-if (rv == APR_SUCCESS) {
-apr_socket_opt_set(s->sock, APR_SO_REUSEADDR, 1);
-}
-#endif
 return rv;
 }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r387590 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardManager.java

2006-03-21 Thread Filip Hanik - Dev Lists

you got it, phase two.

Remy Maucherat wrote:

Filip Hanik - Dev Lists wrote:

everyone kosher with this change?


I like it.

I also remember you agreed a million years ago that the clustering 
session(s) implementation(s) should extend StandardSession (hehe).


Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: quick fix to be able to run configure on freebsd 6.0

2006-03-21 Thread Jean-frederic Clere

Tomas Klockar wrote:


Hello,
this change makes it possible to run configure on freebsd 6.x
---8<8<---8< 


golf# pwd
/usr/local/tomcat5.5/bin/jsvc-src
golf# diff configure configure.old
2412,2416d2411
<   freebsd6.?)
< CFLAGS="$CFLAGS -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread"
< LDFLAGS="-pthread $LDFLAGS"
< supported_os="freebsd"
< ;;
-8<--8<8<- 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


freebsd6.x  is already supported by support/apsupport.m4 in svn of 
jakarta daemon:

+++
 freebsd*)
   CFLAGS="$CFLAGS -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread"
   LDFLAGS="-pthread $LDFLAGS"
   supported_os="freebsd"
   ;;
+++

Time  to make a new release of daemon?

Cheers

Jean-Frederic

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387608 - /tomcat/container/tc5.5.x/webapps/docs/status.xml

2006-03-21 Thread jfclere
Author: jfclere
Date: Tue Mar 21 11:47:29 2006
New Revision: 387608

URL: http://svn.apache.org/viewcvs?rev=387608&view=rev
Log:
Arrange 33117.

Modified:
tomcat/container/tc5.5.x/webapps/docs/status.xml

Modified: tomcat/container/tc5.5.x/webapps/docs/status.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/status.xml?rev=387608&r1=387607&r2=387608&view=diff
==
--- tomcat/container/tc5.5.x/webapps/docs/status.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/status.xml Tue Mar 21 11:47:29 2006
@@ -112,7 +112,7 @@
 
   The list of the bugs which are in an unresolved state for Tomcat 5 can be
   seen 
-  http://issues.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&resolution=LATER&resolution=REMIND&resolution=---&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=Tomcat+5&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&bug_file_loc=&bug_file_loc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=%27Importance%27";>here.
+  http://issues.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&resolution=LATER&resolution=REMIND&resolution=---&bugidtype=include&product=Tomcat+5&cmdtype=doit&order=Importance";>here.
   Aspiring volunteers and others are strongly encouraged to attempt 
   to comment and help resolve these issues.
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39053] New: - include Tomcat embedded sample

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39053

   Summary: include Tomcat embedded sample
   Product: Tomcat 5
   Version: Unknown
  Platform: Other
OS/Version: other
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


An sample Java program to show how to run Tomcat embedded should be included in
the distribution. It should include a java main program that should not need any
disc based config files. Also there should be included a build.xml to show what
libraries are are needed at compile and run time.

A starting point could be these posts:

http://www.theserverside.com/discussions/thread.tss?thread_id=30625
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg144216.html

(the sample from theserverside.com fails with
java.lang.NoClassDefFoundError: javax/management/MBeanRegistration)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387616 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: ./ tcp/ tcp/nio/ tipis/

2006-03-21 Thread fhanik
Author: fhanik
Date: Tue Mar 21 12:35:39 2006
New Revision: 387616

URL: http://svn.apache.org/viewcvs?rev=387616&view=rev
Log:
Worked out some bugs in the map

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AbstractSender.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java?rev=387616&r1=387615&r2=387616&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java
 Tue Mar 21 12:35:39 2006
@@ -43,6 +43,21 @@
 super(cause);
 }
 
+public String getMessage() {
+StringBuffer buf = new StringBuffer(super.getMessage());
+if (faultyMembers==null || faultyMembers.size() == 0 ) {
+buf.append("; No faulty members identified.");
+} else {
+buf.append("; Faulty members:");
+for ( int i=0; ihttp://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AbstractSender.java?rev=387616&r1=387615&r2=387616&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AbstractSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AbstractSender.java
 Tue Mar 21 12:35:39 2006
@@ -48,7 +48,7 @@
 private Member destination;
 private InetAddress address;
 private int port;
-private int maxRetryAttempts = 0;//zero resends
+private int maxRetryAttempts = 2;//zero resends
 private int attempt;
 public AbstractSender() {
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java?rev=387616&r1=387615&r2=387616&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
 Tue Mar 21 12:35:39 2006
@@ -147,9 +147,7 @@
 ackbuf.append(readbuf,read);
 readbuf.clear();
 if (ackbuf.doesPackageExist() ) {
-System.out.print("Reading ack:");
 boolean result = 
Arrays.equals(ackbuf.extractDataPackage(true),org.apache.catalina.tribes.tcp.Constants.ACK_DATA);
-System.out.println(result);
 return result;
 } else {
 return false;

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java?rev=387616&r1=387615&r2=387616&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java
 Tue Mar 21 12:35:39 2006
@@ -120,7 +120,7 @@
 state.setSuspect();
 byte[] data = sender.getMessage();
 int attempt = sender.getAttempt()+1;
-if ( sender.getAttempt() >= maxAttempts && maxAttempts>0 ) {
+if ( sender.getAttempt() <= maxAttempts && maxAttempts>0 ) {
 try { 
 sender.disconnect(); 
 sender.connect();
@@ -130,7 +130,7 @@
 state.setFailing();
 }
 } else {
-ChannelException cx = new ChannelException(x);
+ChannelException cx = new ChannelException(

Requesting volunteers to regression test commons-logging release candidate

2006-03-21 Thread robert burrell donkin
hello one and all

JCL 1.1 is now very close to being released. we've done a lot of
testing and spent a long time analysing the code base. we think we've
solved as many of the issues with the 1.0.x series of releases which
can be without breaking compatibility.

we're now approaching some major downstream projects which have used
the 1.0.x series releases to see if anyone would be willing to run
regression tests to make sure we haven't introduced any problems with
this release. if no issues emerge then it's expected that this release
candidate will be the final one.

IIRC remy had plans for a next generation replacement (cool by me BTW,
we're just trying to fix as many problems as possible for existing
users) but i'm not really sure how advanced these plans are.

i'd be very grateful if volunteers woul step up to regression test the
latest release candidate (RC6) as a replacement for whichever 1.0.x
release is used against as many tomcat versions as possible. it's
available in cvs.apache.org/repository and from
http://people.apache.org/~rdonkin/commons-logging.

TIA

- robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: yet another tomcat goes stable and I still have to make a custom package

2006-03-21 Thread Haroon Rafique
Hi Yoav,

Thanks for responding. Please see my replies below:


On Today at 11:26am, YS=>Yoav Shapira <[EMAIL PROTECTED]> wrote:

YS> Hi,
YS> The reason your patch hasn't been applied yet (or at least, the reason 
YS> I haven't applied it yet, and I have looked at it once your twice) is 
YS> that I'm sure the copy operation you remove is really redundant in all 
YS> cases.
YS>

Please read on, and I'll prove to you that the code in question is in fact 
a mistake.

YS> 
YS> The copy operation seems to have been added as part of revision 303270 
YS> committed on Thu Sep 23 07:03:27 2004 UTC by Remy.  It's been nearly a 
YS> year and half since then, with no complaints about this code except 
YS> yours, so it seems to work for the majority of users.  Accordingly, 
YS> before we go and apply your patch, we'd need to be convinced that it 
YS> doesn't introduce a regression failure.
YS> 

Let the convincing begin...

[If you want, we can take this offline and you can reply inside bugzilla 
36847.]

The code in question pre-revision 303270 used to look like this:

// Copy WAR and XML to the host base
if (tag != null) {
deployedPath = deployed;
File localWarCopy = new File(deployedPath, basename + ".war");
copy(localWar, localWarCopy);
localWar = localWarCopy;
}

The code after revision 303270 looks like this:

// Copy WAR and XML to the host app base if needed
if (tag != null) {
deployedPath = deployed;
File localWarCopy = new File(deployedPath, 
basename + ".war");
copy(localWar, localWarCopy);
localWar = localWarCopy;
copy(localWar, new File(getAppBase(), basename + 
".war"));
}

Can we agree on the fact that there are 2 copy() methods inside the
if (tag != null) {} code snippet?

If that is indeed the case, then can we also agree that this code only 
runs when tag is not null and any modifications to this code will *NOT* 
effect anything else as long as tag is null?

Now onto more. I can confirm for you that the following code snippet 
inside an ant file does *NOT* work.

http://localhost:8080/manager";
username="username_here"
password="password_here"
path="/myapp"
update="true"
tag="some-tag-here"
war="file:/path/to/war/myapp.war"/>

Just because no one else has complained about it (for a year or however 
long) does not mean that the bug does not exist. In my case, I always 
get a:
SEVERE: Exception fixing docBase: {0} 
java.util.zip.ZipException: error in opening zip file
followed by:
SEVERE: Error starting static Resources 
java.lang.IllegalArgumentException: Invalid or unreadable WAR file 
: error in opening zip file
in catalina.out. And for more proof the webapps directory contains a 0 
length .war file.

1) Do you yourself use remote war deployment while using tags using ant?
2) Have you tried the above ant code snippet (after cleaning up some of 
   the attributes)?
3) How can we ship a tomcat with a broken feature that no one has really 
   bothered to test? Perhaps, (after fixing this) the next step is to 
   write an automated test for this. Remember this used to work in 5.5.9.

Now, I'll explain why it fails:

Here's the sequence of events (my context is called sws):

1) context is undeployed

2) local war is uploaded to:
/www/apache-tomcat-5.5.16/work/Catalina/localhost/manager/some-tag-here/sws.war

3) First copy() method copies:
/www/apache-tomcat-5.5.16/work/Catalina/localhost/manager/some-tag-here/sws.war
to new File():
/www/tomcat/webapps/sws.war
We have a good copy at this moment in time.

3) Second copy() method copies:
/www/tomcat/webapps/sws.war
to new File():
/www/tomcat/webapps/sws.war
essentially resulting in a 0-length file. Can you see my pain at this 
point? The code has basically guaranteed a 0-length file.

Why is step 3) even necessary?

Furthermore, I can confirm for you that taking out the offending lines, 
makes remote war deployment via tags 100% successful for me.

YS> [..snip..]
YS> 

Thanks for listening,
--
Haroon Rafique
<[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Broken link

2006-03-21 Thread Jean-frederic Clere

Tomas Klockar wrote:


On the status page for apache tomcat
http://tomcat.apache.org/tomcat-5.5-doc/status.html
the link to the open bugs at the bottem of the page is broken.

regards

/Tomas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




I have fixed it but I have noted that the 5.5 doc is twice in minotaur:
+++
> find /www/tomcat.apache.org -name status.html
/www/tomcat.apache.org/tomcat-5.5-doc/printer/status.html
/www/tomcat.apache.org/tomcat-5.5-doc/status.html
/www/tomcat.apache.org/tomcat-5.0-doc/printer/status.html
/www/tomcat.apache.org/tomcat-5.0-doc/status.html
/www/tomcat.apache.org/tomcat-5.5-doc-v5.5.15/printer/status.html
/www/tomcat.apache.org/tomcat-5.5-doc-v5.5.15/status.html
+++

Why and why 5.5.15?

Cheers

Jean-Frederic

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Broken link

2006-03-21 Thread Yoav Shapira
Hola,
It's just a leftover from the previous release.  When I ship release
N, I change tomcat-5.5-doc to tomcat-5.5-doc-v(n-1) rather than remove
it, so that if something goes wrong during the shipping process I can
quickly restore the documentation for the old release.  It's not
strictly necessary, just a safety measure.  Then when I ship release
n+1 I complete remove the n-1 docs.

(This is a leftover from the time when docs used to take several hours
to sync between minotaur and ajax -- the discrepancy is now reduced to
minutes)

Yoav

On 3/21/06, Jean-frederic Clere <[EMAIL PROTECTED]> wrote:
> Tomas Klockar wrote:
>
> > On the status page for apache tomcat
> > http://tomcat.apache.org/tomcat-5.5-doc/status.html
> > the link to the open bugs at the bottem of the page is broken.
> >
> > regards
> >
> > /Tomas
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> I have fixed it but I have noted that the 5.5 doc is twice in minotaur:
> +++
>  > find /www/tomcat.apache.org -name status.html
> /www/tomcat.apache.org/tomcat-5.5-doc/printer/status.html
> /www/tomcat.apache.org/tomcat-5.5-doc/status.html
> /www/tomcat.apache.org/tomcat-5.0-doc/printer/status.html
> /www/tomcat.apache.org/tomcat-5.0-doc/status.html
> /www/tomcat.apache.org/tomcat-5.5-doc-v5.5.15/printer/status.html
> /www/tomcat.apache.org/tomcat-5.5-doc-v5.5.15/status.html
> +++
>
> Why and why 5.5.15?
>
> Cheers
>
> Jean-Frederic
>


--
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: yet another tomcat goes stable and I still have to make a custom package

2006-03-21 Thread Filip Hanik - Dev Lists
Question, if you remove the lines you mentioned, does the application 
get deployed in your local instance, the one where the manager servlet 
runs? Cause the line that is removed is where the war is copied to the 
appbase of the host.


I haven't had time to run through this patch, but there should be a -1 
if we don't want it, and an explanation along with that.


so I am +0 on it, since don't have time to test it

Filip


Haroon Rafique wrote:

Hi Yoav,

Thanks for responding. Please see my replies below:


On Today at 11:26am, YS=>Yoav Shapira <[EMAIL PROTECTED]> wrote:

YS> Hi,
YS> The reason your patch hasn't been applied yet (or at least, the reason 
YS> I haven't applied it yet, and I have looked at it once your twice) is 
YS> that I'm sure the copy operation you remove is really redundant in all 
YS> cases.

YS>

Please read on, and I'll prove to you that the code in question is in fact 
a mistake.


YS> 
YS> The copy operation seems to have been added as part of revision 303270 
YS> committed on Thu Sep 23 07:03:27 2004 UTC by Remy.  It's been nearly a 
YS> year and half since then, with no complaints about this code except 
YS> yours, so it seems to work for the majority of users.  Accordingly, 
YS> before we go and apply your patch, we'd need to be convinced that it 
YS> doesn't introduce a regression failure.
YS> 


Let the convincing begin...

[If you want, we can take this offline and you can reply inside bugzilla 
36847.]


The code in question pre-revision 303270 used to look like this:

// Copy WAR and XML to the host base
if (tag != null) {
deployedPath = deployed;
File localWarCopy = new File(deployedPath, basename + ".war");
copy(localWar, localWarCopy);
localWar = localWarCopy;
}

The code after revision 303270 looks like this:

// Copy WAR and XML to the host app base if needed
if (tag != null) {
deployedPath = deployed;
File localWarCopy = new File(deployedPath, 
basename + ".war");

copy(localWar, localWarCopy);
localWar = localWarCopy;
copy(localWar, new File(getAppBase(), basename + 
".war"));

}

Can we agree on the fact that there are 2 copy() methods inside the
if (tag != null) {} code snippet?

If that is indeed the case, then can we also agree that this code only 
runs when tag is not null and any modifications to this code will *NOT* 
effect anything else as long as tag is null?


Now onto more. I can confirm for you that the following code snippet 
inside an ant file does *NOT* work.


http://localhost:8080/manager";
username="username_here"
password="password_here"
path="/myapp"
update="true"
tag="some-tag-here"
war="file:/path/to/war/myapp.war"/>

Just because no one else has complained about it (for a year or however 
long) does not mean that the bug does not exist. In my case, I always 
get a:
	SEVERE: Exception fixing docBase: {0} 
	java.util.zip.ZipException: error in opening zip file

followed by:
	SEVERE: Error starting static Resources 
	java.lang.IllegalArgumentException: Invalid or unreadable WAR file 
	: error in opening zip file
in catalina.out. And for more proof the webapps directory contains a 0 
length .war file.


1) Do you yourself use remote war deployment while using tags using ant?
2) Have you tried the above ant code snippet (after cleaning up some of 
   the attributes)?
3) How can we ship a tomcat with a broken feature that no one has really 
   bothered to test? Perhaps, (after fixing this) the next step is to 
   write an automated test for this. Remember this used to work in 5.5.9.


Now, I'll explain why it fails:

Here's the sequence of events (my context is called sws):

1) context is undeployed

2) local war is uploaded to:
/www/apache-tomcat-5.5.16/work/Catalina/localhost/manager/some-tag-here/sws.war

3) First copy() method copies:
/www/apache-tomcat-5.5.16/work/Catalina/localhost/manager/some-tag-here/sws.war
to new File():
/www/tomcat/webapps/sws.war
We have a good copy at this moment in time.

3) Second copy() method copies:
/www/tomcat/webapps/sws.war
to new File():
/www/tomcat/webapps/sws.war
essentially resulting in a 0-length file. Can you see my pain at this 
point? The code has basically guaranteed a 0-length file.


Why is step 3) even necessary?

Furthermore, I can confirm for you that taking out the offending lines, 
makes remote war deployment via tags 100% successful for me.


YS> [..snip..]
YS> 


Thanks for listening,
--
Haroon Rafique
<[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



---

Re: yet another tomcat goes stable and I still have to make a custom package

2006-03-21 Thread Haroon Rafique
On Today at 4:02pm, FHDL=>Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

FHDL> Question, if you remove the lines you mentioned, does the 
FHDL> application get deployed in your local instance, the one where the 
FHDL> manager servlet runs? Cause the line that is removed is where the 
FHDL> war is copied to the appbase of the host.
FHDL> 


Hi Filip,

Thanks to you too for responding. I don't really understand your question. 
With my "fix", the application gets deployed in the regular place (webapps 
directory) and I can see it under the manager servlet as well. I'm not 
quite sure what you mean by local instance??

The copy() line that is removed:

   copy(localWar, new File(getAppBase(), basename + ".war"));

is pretty misleading. At this point, the value of localWar (the first 
argument) and new File(GetAppBase(), basename + ".war") is exactly the 
same. So, the call in fact clobbers a perfectly valid war file with a new 
0-length file. In pseudo-code I can translate that to copy from an already 
existing war file onto itself (creating a new one in the process) and 
eventually end up with a 0-length file. As I explained in one of my 
earlier emails, the copy to appbase of the host has already happened in 
the previous copy() method call with no problems.

As a test I put a Thread.sleep(2) in between the 2 copy methods and 
sure enough, the war file is full-length in the webapps directory after 
the 1st call and 0-length after the 2nd call.

FHDL> 
FHDL> I haven't had time to run through this patch, but there should be a 
FHDL> -1 if we don't want it, and an explanation along with that.
FHDL> 
FHDL> so I am +0 on it, since don't have time to test it
FHDL>

:-( Sorry to hear that, but at least you responded. Neutral is better than 
negative.

FHDL> 
FHDL> Filip
FHDL> 

Cheers,
--
Haroon Rafique
<[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39055] New: - Firewall access for JSR 160 JMX with Java 5

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39055

   Summary: Firewall access for JSR 160 JMX with Java 5
   Product: Tomcat 5
   Version: 5.5.16
  Platform: Other
OS/Version: other
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html states:

  Note:The JSR 160 JMX-Adaptor opens a second data protocol port. That is a
problem when you have installed a local firewall.

This can be fixed by using a custom JMXConnectorServer to control both
ports thus allowing firewall access.

Eg. This is a GLP I threw together to try it out:

public class JMXPortServer extends HttpServlet {
  static JMXConnectorServer cs;
  static String jmxHost;
  static {
try {
  final InetAddress host = InetAddress.getLocalHost();
  jmxHost = host.getHostName();
  final int jmxPort =
Integer.parseInt(System.getProperty("org.jasig.portal.jmxPort"));
  final int jmxPort2 = jmxPort + 1;

  LocateRegistry.createRegistry(jmxPort);
  System.err.println("getPlatformMBeanServer()");
  MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();

  HashMap env = new HashMap();
  final String sslProperty = "com.sun.management.jmxremote.ssl";
  String value = System.getProperty(sslProperty);
  if (Boolean.getBoolean(value)) {
SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
SslRMIServerSocketFactory ssf = new SslRMIServerSocketFactory();
env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, ssf);
  }

  final String passwordFileProperty =
"com.sun.management.jmxremote.password.file";
  value = System.getProperty(passwordFileProperty);
  if (value != null) {
env.put("jmx.remote.x.password.file", value);
  }

  final String jmxUrl = "service:jmx:rmi://" + jmxHost + ":" + jmxPort2
+"/jndi/rmi://" + jmxHost + ":" + jmxPort + "/server";
  final JMXServiceURL url = new JMXServiceURL(jmxUrl);
  cs = JMXConnectorServerFactory.newJMXConnectorServer(
  url, env, mbs);

  try {
cs.start();
LogService.log(LogService.INFO, "JMXPrtServer started on " + jmxUrl);
  } catch (IOException ex) {
LogService.log(LogService.ERROR, ex);
  }
} catch (Exception ex) {
  System.err.println(ex);
}
  }
}

I tell tomcat to load the servlet through web.xml and start the
JVM with:

-Dcom.sun.management.jmxremote -Dorg.jasig.portal.jmxPort=7087
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.password.file=/usr/local/src/myUBC2/conf/jmxremote.password


I then run jconsole on my desktop with:

  jconsole service:jmx:rmi://host:7088/jndi/rmi://host:7087/server

and, bingo, JMX access.

It would be be better if this was built into Tomcat as a configuration
option, rather than having to do it as part of every Tomcat instance.

I haven't tried out the ssl connection code (I got this code from
http://forum.java.sun.com/thread.jspa?forumID=58&threadID=703567)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39057] New: - Firewall access for JSR 160 JMX with Java 5

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39057

   Summary: Firewall access for JSR 160 JMX with Java 5
   Product: Tomcat 5
   Version: 5.5.16
  Platform: Other
OS/Version: other
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html states:

  Note:The JSR 160 JMX-Adaptor opens a second data protocol port. That is a
problem when you have installed a local firewall.

This can be fixed by using a custom JMXConnectorServer to control both
ports thus allowing firewall access.

Eg. This is a GLP I threw together to try it out:

public class JMXPortServer extends HttpServlet {
  static JMXConnectorServer cs;
  static String jmxHost;
  static {
try {
  final InetAddress host = InetAddress.getLocalHost();
  jmxHost = host.getHostName();
  final int jmxPort =
Integer.parseInt(System.getProperty("org.jasig.portal.jmxPort"));
  final int jmxPort2 = jmxPort + 1;

  LocateRegistry.createRegistry(jmxPort);
  System.err.println("getPlatformMBeanServer()");
  MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();

  HashMap env = new HashMap();
  final String sslProperty = "com.sun.management.jmxremote.ssl";
  String value = System.getProperty(sslProperty);
  if (Boolean.getBoolean(value)) {
SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
SslRMIServerSocketFactory ssf = new SslRMIServerSocketFactory();
env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, ssf);
  }

  final String passwordFileProperty =
"com.sun.management.jmxremote.password.file";
  value = System.getProperty(passwordFileProperty);
  if (value != null) {
env.put("jmx.remote.x.password.file", value);
  }

  final String jmxUrl = "service:jmx:rmi://" + jmxHost + ":" + jmxPort2
+"/jndi/rmi://" + jmxHost + ":" + jmxPort + "/server";
  final JMXServiceURL url = new JMXServiceURL(jmxUrl);
  cs = JMXConnectorServerFactory.newJMXConnectorServer(
  url, env, mbs);

  try {
cs.start();
LogService.log(LogService.INFO, "JMXPrtServer started on " + jmxUrl);
  } catch (IOException ex) {
LogService.log(LogService.ERROR, ex);
  }
} catch (Exception ex) {
  System.err.println(ex);
}
  }
}

I tell tomcat to load the servlet through web.xml and start the
JVM with:

-Dcom.sun.management.jmxremote -Dorg.jasig.portal.jmxPort=7087
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.password.file=/usr/local/src/myUBC2/conf/jmxremote.password


I then run jconsole on my desktop with:

  jconsole service:jmx:rmi://host:7088/jndi/rmi://host:7087/server

and, bingo, JMX access.

It would be be better if this was built into Tomcat as a configuration
option, rather than having to do it as part of every Tomcat instance.

I haven't tried out the ssl connection code (I got this code from
http://forum.java.sun.com/thread.jspa?forumID=58&threadID=703567)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33117] - Deep link into Bugzilla broken on ROOT/index.jsp

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33117





--- Additional Comments From [EMAIL PROTECTED]  2006-03-21 23:13 ---
It was also in the status.html page.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33453] - Jasper should recompile JSP files whose datestamps change in either direction (not just newer)

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33453





--- Additional Comments From [EMAIL PROTECTED]  2006-03-21 23:45 ---
I think the patch files are backwards (show how to remove the fix) but that 
doesn't make this bug less 
important.   We just got bit by this thing again... every couple of month at my 
company.   It's time to bite 
the bullet and make a one-off version.   Is it ever going to be fixed?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: yet another tomcat goes stable and I still have to make a custom package

2006-03-21 Thread Filip Hanik - Dev Lists

aah got it, in that case,

+1

to get this fixed,
will wait a day or two, if no minus one votes come up, I'll apply it for 
you, just remind me :)


Filip


Haroon Rafique wrote:

On Today at 4:02pm, FHDL=>Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

FHDL> Question, if you remove the lines you mentioned, does the 
FHDL> application get deployed in your local instance, the one where the 
FHDL> manager servlet runs? Cause the line that is removed is where the 
FHDL> war is copied to the appbase of the host.
FHDL> 



Hi Filip,

Thanks to you too for responding. I don't really understand your question. 
With my "fix", the application gets deployed in the regular place (webapps 
directory) and I can see it under the manager servlet as well. I'm not 
quite sure what you mean by local instance??


The copy() line that is removed:

   copy(localWar, new File(getAppBase(), basename + ".war"));

is pretty misleading. At this point, the value of localWar (the first 
argument) and new File(GetAppBase(), basename + ".war") is exactly the 
same. So, the call in fact clobbers a perfectly valid war file with a new 
0-length file. In pseudo-code I can translate that to copy from an already 
existing war file onto itself (creating a new one in the process) and 
eventually end up with a 0-length file. As I explained in one of my 
earlier emails, the copy to appbase of the host has already happened in 
the previous copy() method call with no problems.


As a test I put a Thread.sleep(2) in between the 2 copy methods and 
sure enough, the war file is full-length in the webapps directory after 
the 1st call and 0-length after the 2nd call.


FHDL> 
FHDL> I haven't had time to run through this patch, but there should be a 
FHDL> -1 if we don't want it, and an explanation along with that.
FHDL> 
FHDL> so I am +0 on it, since don't have time to test it

FHDL>

:-( Sorry to hear that, but at least you responded. Neutral is better than 
negative.


FHDL> 
FHDL> Filip
FHDL> 


Cheers,
--
Haroon Rafique
<[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33453] - Jasper should recompile JSP files whose datestamps change in either direction (not just newer)

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33453





--- Additional Comments From [EMAIL PROTECTED]  2006-03-22 00:22 ---
(In reply to comment #32)
Sorry for getting the patch backwards.  Not that it matters, it will probably 
never be incorporated any way, due to the co-location of a certain person's 
head with his ass.
Do the votes matter?  I am the only one voting for this, perhaps if a few more 
people used their votes it would show up on a list somewhere, causing some 
action to be taken. 
Other than patching Tomcat, here's what I recommend, in order of preference:
1) Don't use Tomcat.
2) Don't use JSPs.
4) Precompile your JSPs as part of your build process.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39053] - include Tomcat embedded sample

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39053





--- Additional Comments From [EMAIL PROTECTED]  2006-03-22 00:29 ---
I started with that sample (theserverside). One thing I found tricky to emulate
is the behavior of the actual Catalina startup class, where it starts the
connector in a suspended state, and then activates it after all the webapps are
deployed.

This prevents the server from replying back with a 500 code to an overly eager
client who comes in "too early" - today, if they can connect, they'll block till
all webapps are deployed, and then get a proper response.

In my own embedded startup, I had to emulate this by creating the connector (as
described in the article), and then immediately invoking the "pause()" API on
the connector, deploying the webapps, and then invoking the "resume()" API on 
it.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r387686 - in /tomcat/container/tc5.5.x/modules: groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ groupcom/src/share/org/apache/catalina/tribes/tipis/ groupcom/test/org/apache/catalin

2006-03-21 Thread fhanik
Author: fhanik
Date: Tue Mar 21 17:57:39 2006
New Revision: 387686

URL: http://svn.apache.org/viewcvs?rev=387686&view=rev
Log:
Initial version of the backup manager, still super buggy, need to figure out a 
way on how to deserialize sessions.

Added:

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/BackupManager.java
Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMap.java

tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/MapDemo.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/CatalinaCluster.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/tcp/SimpleTcpCluster.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java?rev=387686&r1=387685&r2=387686&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
 Tue Mar 21 17:57:39 2006
@@ -216,11 +216,12 @@
 setConnected(false);
 if ( socketChannel != null ) {
 try {
-Socket socket = socketChannel.socket();
+Socket socket = null;
+//socket = socketChannel.socket();
 //error free close, all the way
-try {socket.shutdownOutput();}catch ( Exception x){}
-try {socket.shutdownInput();}catch ( Exception x){}
-try {socket.close();}catch ( Exception x){}
+//try {socket.shutdownOutput();}catch ( Exception x){}
+//try {socket.shutdownInput();}catch ( Exception x){}
+//try {socket.close();}catch ( Exception x){}
 try {socketChannel.close();}catch ( Exception x){}
 socket = null;
 }finally {

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=387686&r1=387685&r2=387686&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
 Tue Mar 21 17:57:39 2006
@@ -64,6 +64,11 @@
  * The load factor used when none specified in constructor.
  **/
 public static final float DEFAULT_LOAD_FACTOR = 0.75f;
+
+/**
+ * Used to identify the map
+ */
+final String chset = "ISO-8859-1";
 
 
//--
 //  INSTANCE VARIABLES
@@ -76,7 +81,7 @@
 private transient Object stateMutex = new Object();
 private transient ArrayList mapMembers = new ArrayList();
 private transient int channelSendOptions = Channel.SEND_OPTIONS_DEFAULT;
-private transient Object mapOwner;
+private transient MapOwner mapOwner;
 
 
//--
 //  CONSTRUCTORS
@@ -90,7 +95,7 @@
  * @param initialCapacity int - the size of this map, see HashMap
  * @param loadFactor float - load factor, see HashMap
  */
-public AbstractReplicatedMap(Object owner,
+public AbstractReplicatedMap(MapOwner owner,
  Channel channel, 
  long timeout, 
  String mapContextName, 
@@ -106,9 +111,9 @@
 return new Member[] {m};
 }
 
-private void init(Object owner, Channel channel, String mapContextName, 
long timeout, int channelSendOptions) {
+private void init(MapOwner owner, Channel channel, String mapContextName, 
long timeout, int channelSendOpt

DO NOT REPLY [Bug 33453] - Jasper should recompile JSP files whose datestamps change in either direction (not just newer)

2006-03-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33453





--- Additional Comments From [EMAIL PROTECTED]  2006-03-22 03:29 ---
Jonathoan, I was about to try using your patch and noticed a problem.   You are 
using the date of the 
JSP file to stamp the class file but the isOutDated() method is also taking 
into account the times of the 
included JSP files.   This can cause a JSP file to be re-compiled on every hit 
if it includes a file that has a 
later date. 

For example, if a.jsp is time-stamped 9:00 and it includes b.jsp which stamped 
10:00, then isOutDated
() will always return true because the time of the included file is greater 
than 9:00.   Then when you 
assign the earlier time to the class file, this check will fail again the next 
time around.

I think a better solution is to set the time of the class file to the greatest 
time of the compiled file AND 
ALL of it's dependants.   In the above scenario, the class file would get a 
time stamp of 10:00 instead of 
9:00 and subsequent checks of isOutDated would return false as expected.   The 
only problem I can 
forsee is if someone updates the included file, THEN rolls back the original 
file.   That seems like a very 
obscure case and my solution is still better than the current solution which 
doesn't account for 
rollbacks at all (and also wouldn't handle the obscure case).

I will attempt a solution but will be on vacation soon so it may be a while 
before I'm able to post any 
patches. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]