Re: [5.0] Property replacement

2003-10-18 Thread Costin Manolache
Remy Maucherat wrote:

> Henri Gomez wrote:
>> +1
>> 
>> The save could be implemented by saving all the discovered properties
>> to an another xml file which will be load at next start time ?
> 
> That won't work: the save-to-XML blindly introspects the objects and
> saves the results.
> 
> Actually, I think we have found a neat feature addition for Tomcat.next:
> abstract the configuration storage and make it R/W. JNDI DirContext
> could be the API, but it's not a perfect fit (we'd need a naming scheme).

My hope was that JMX could be used for configuration ( including storage ). 
It can't support server.xml - so it would require changing the config file
to a set of generic mbean declarations. If JMX is both loading and storing
the config - it can deal with ${properties} and preserve the original file
layout. ( the current code in modeler is mostly working - but I doubt
anyone has tested it )

Costin


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



Re: Benchmarking gcj-built Tomcat

2003-10-18 Thread Costin Manolache
Gary Benson wrote:

> Costin Manolache wrote:
>> My benchmarks ( > 1 yr ago ) showed GCJ-based tomcat to be as fast
>> as the IBM JDK1.3 ( the fastest VM at that time ). There were small
>> differences under different loads - but the garbage collector seemed
>> like the biggest factor ( GCJ performed worse on JSP pages where
>> more objects were created if I remember correctly ).
> 
> Do you still have the benchmark code around?  I'd love to see it...

No special code - I used the same tests as for regular tomcat.
The tricky part was getting tomcat ( and all its depedents ) compiled with
GCJ, then figure out how to deal with resources. Dynamic class loading 
turned out to just work, but I think I had to do few tweaks in the class
loader ( basically hack it to use a flat loader - probably now it won't be
needed ).

After tomcat was working - "ab" with servlets and jsps.



>> The amazing thing was the startup time - almost 0 ( it felt more
>> like apache :-).
> 
> It does start up fast :)  The compiler we're using has a funky
> experimental optimiser (the same as used in the fast free eclipse
> project), and the startup became perhaps twice as fast when I switched
> from gcj 3.3.  It compiles JSPs pretty fast too.  That's one reason
> why I'd like to benchmark it.

Startup time is probably more important for ant or javac or other things
that are run frequently. But it is cool to see tomcat start in the same
time as apache. ( or ant as fast as make )

> 
>> BTW - GCJ is not a virtual machine and doesn't have a JIT - it is a
>> ahead-of-time compiler, just like C and C++ compilers.
> 
> This may have been true a while back, but it isn't now -- gcj can
> interpret bytecode just like any other JVM.  In my Tomcat package this
> is exactly what it does when executing servlets (everything else is
> built to native code).  You're right in that doesn't have a JIT
> though.

I did compile the servlets as well to native. 

>> The biggest problem at that time was dynamic class loading. GCJ has
>> a small interpretor and could load servlets - but the difference in
>> performance between precompiled code and interpretor was
>> significant.
> 
> It probably still is, though not as bad.  But it's not such a big
> problem as it seems, as most of the calls that a given servlet makes
> will be to native-compiled methods.

JSPs tend to have a lot of code inside. 

The interesting part is that class loading works ( or it used to work ) by 
using .so files. 

So it should be possible to hack the webapp deployer to invoke gcj on all
the jar files in lib/ and generate the .so. I don't know how easy it is to 
get the .so files loaded, but I'm sure gcj uses dl* to work with the .so
files.

The only major problem I see is the sandbox - but unfortunately most people
don't use it anyway ( even if they should ). From a security point of view
- compiling all the servlets to native or running in JDK without sandbox is
equivalent - a bad serlvet can do as much damage as it wants. But if you 
want security - I'm not sure if GCJ implements the sandbox and all the code
verifications that are needed - last time I looked it didn't seem to.

Costin





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



DO NOT REPLY [Bug 23914] New: - NullPointerException in Coyote Adapter

2003-10-18 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=23914

NullPointerException in Coyote Adapter

   Summary: NullPointerException in Coyote Adapter
   Product: Tomcat 4
   Version: 4.1.27
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Connector:Coyote HTTP/1.1
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]


Tomcat closes the TCP connection as soon as the GET request is sent. The
following is the stack trace that appears on catalina_log.*.txt

It seems to happen in random intervals. The only way to recover at this point is
to restart tomcat.

Also seems to happen only with redhat linux 9 version:
   Linux nars 2.4.20-9smp #1 SMP Wed Apr 2 13:28:49 EST 2003 i686 i686 i386
GNU/Linux



2003-10-18 18:07:06 CoyoteAdapter An exception or error occurred in the
container during the request processing
java.lang.NullPointerException
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:164)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)

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



Re: Fwd: typo in tomcat site

2003-10-18 Thread Tim Funk
I think this was fixed already. But I think the docs (including javadocs) 
from the latest release are not in sync with the public site.

-Tim

Pier Fumagalli wrote:
Not acked.

Pier

Begin forwarded message:

From: Martin Gomez <[EMAIL PROTECTED]>
Date: 18 October 2003 19:07:28 GMT+09:00
To: [EMAIL PROTECTED]
Subject: typo in tomcat site
Hi Jakarta Webmaster,

There's a typographic error in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
The first bullet should read "... under /WEB-INF/classes ..." and not 
"... under
/WEB-INF/classe ..."

Thanks. :)

--
Martin Gomez
Researcher, Ateneo Java Wireless Competency Center
CTC 213, Ateneo de Manila University, QC 1108
martin.gomez_at_acm.org / martin_at_decode.ateneo.edu
http://decode.ateneo.edu/martin/





-
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 23908] - Occasional Access Violation Exception in the VM when sockets don't bind

2003-10-18 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=23908

Occasional Access Violation Exception in the VM when sockets don't bind

[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|Occasional Access Violation |Occasional Access Violation
   |Exception in the native code|Exception in the VM when
   |of the VM   |sockets don't bind

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



DO NOT REPLY [Bug 23908] New: - Occasional Access Violation Exception in the native code of the VM

2003-10-18 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=23908

Occasional Access Violation Exception in the native code of the VM

   Summary: Occasional Access Violation Exception in the native code
of the VM
   Product: Tomcat 5
   Version: 5.0.12
  Platform: PC
OS/Version: Other
Status: NEW
  Severity: Major
  Priority: Other
 Component: Native:Integration
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc005) occurred at 
PC=0xBFF7B9A6
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
  just occurred. Please refer to release documentation for possible
  reason and solutions.


Current Java thread:
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
- locked <0x10044008> (a java.net.PlainSocketImpl)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.(Socket.java:309)
at java.net.Socket.(Socket.java:124)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:433)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:320)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:394)

Dynamic libraries:
0x7CC0 - 0x7CC1D000 C:\WINDOWS\SYSTEM\IMAGEHLP.DLL

Heap at VM Abort:
Heap
 def new generation   total 576K, used 241K [0x1001, 0x100b, 0x104f)
  eden space 512K,  40% used [0x1001, 0x10044220, 0x1009)
  from space 64K,  50% used [0x100a, 0x100a8268, 0x100b)
  to   space 64K,   0% used [0x1009, 0x1009, 0x100a)
 tenured generation   total 1408K, used 481K [0x104f, 0x1065, 
0x1401)
   the space 1408K,  34% used [0x104f, 0x10568468, 0x10568600, 0x1065)
 compacting perm gen  total 4096K, used 2782K [0x1401, 0x1441, 
0x1801)
   the space 4096K,  67% used [0x1401, 0x142c7818, 0x142c7a00, 0x1441)

Local Time = Thu Oct 16 16:05:38 2003
Elapsed Time = 3
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode)
#

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



Fwd: typo in tomcat site

2003-10-18 Thread Pier Fumagalli
Not acked.

	Pier

Begin forwarded message:

From: Martin Gomez <[EMAIL PROTECTED]>
Date: 18 October 2003 19:07:28 GMT+09:00
To: [EMAIL PROTECTED]
Subject: typo in tomcat site
Hi Jakarta Webmaster,

There's a typographic error in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
The first bullet should read "... under /WEB-INF/classes ..." and not 
"... under
/WEB-INF/classe ..."

Thanks. :)

--
Martin Gomez
Researcher, Ateneo Java Wireless Competency Center
CTC 213, Ateneo de Manila University, QC 1108
martin.gomez_at_acm.org / martin_at_decode.ateneo.edu
http://decode.ateneo.edu/martin/





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