Re: [PLAN] New Jasper

2002-03-26 Thread Louis Tribble

Henri Gomez wrote:

> May be because of license of javacc ;-)

That hasn't stopped Velocity from using it. But in any case, there
was an announcement on the JavaCC list a couple of days ago
that JavaCC will be open sourced over the next few months.

Louis Tribble



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




Re: [TC4.0] Disabling debug output...

2001-07-19 Thread Louis Tribble

Craig wrote:
> - The typical approach with the JSR47 API or with Log4J is to let the
>   logger decide whether to really output the message or not.  So, you
>   would instrument your code with things like (conceptual, not real API):
> 
>   logger.log("The object is " + myObject, Logger.DEBUG);
> 
>   and let the logger configuration decide whether you care about debug
>   messages or not.
> 
> - However, there is a performance problem with leaving this code in --
>   you will be doing the string concatenation (and the method call)
>   whether or not you want debug messages printed!  If you are liberal
>   about debug messages, especially inside frequently executed methods,
>   this can have adverse impacts on performance (and increased garbage
>   collection).

Often the toString() are much worse than the concatenations. After we realized 
what a HUGE impact this had on performance, we added a bunch of overloadings
so that you could convert the above to the equivalent of:

 logger.log(Logger.DEBUG, "The object is {0}", myObject);

where the formatting is only done once it's known that the category is enabled
(we used named categories instead of levels, but that's another discussion). I just
went and looked at log4j and java.util.logging and it looks like both would require 
going through a wrapper class to get this feature.

The number of overloadings is a bit of a pain for the implementer once you 
consider that you would often want to log boolean, int, and in some applications
float parameters, but not for the caller.

Louis Tribble





Re: Compiling JSP with debug info

2000-12-01 Thread Louis Tribble

"Craig R. McClanahan" wrote:
> 
> Larry Isaacs wrote:
> 
> > Hi all,
> >
> > We have a need for a global way to have Jasper compile the
> > JSP servlet source with debug information.  I would propose
> > defining a system property such as:
> >
> > jasper.compile.debug
> >
> > which if set to "true" would turn on the inclusion of debug
> > info.  Any objections or alternative property names?
> >
> 
> Wouldn't you really want this option at the per-web-app level, rather than
> global?  While we were at it, you'd want similar options for turning
> optimization on and off, or (more generally) a way to set compiler options for a
> generic compiler.

Getting Tomcat to use the right compiler command to work with our
debugger has been a headache, both in preparing documentation and
in providing support. And Tomcat 3.1 and 3.2 have some differences
besides. I would love to see this configurable in server.xml both
globally and per context, and at a more abstract level than an
initialization parameter to org.apache.jasper.runtime.JspServlet.

Ideally, in fact, the configuration value would be the
compile command string, whose meaning everybody already 
understands, for example: "javac", "jikes", "/usr/java/bin/javac -g", 
or (in our case) "mjavac -g".

[It may be desirable to support a separate compiler type parameter
(which can usually be inferred from the compile command) to deal
with differences (e.g. classpath handling) between 1.1 javac,
1.2 javac, and jikes.]

Invoking javac in-process could be viewed as an under the hood 
optimization (if the command is "javac" with no path, invoke
in-process) but it could be exposed explicitly.

We're about to release an inexpensive Tomcat edition of our debugger:
for now, in order to have the same instructions for Tomcat 3.1 and
3.2, and given that we don't want to embed Tomcat, I haven't thought
of anything better than recommending replacing tomcat.bat/sh with a 
slightly modified one that we supply (or editing the java invocations
by hand if it's been customized).

Comments?
 
Louis Tribble
-- 

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Louis Tribble [EMAIL PROTECTED]
Metamata, Inc.   http://www.metamata.com
Tools for serious Java developers.   +1 510 796 0915
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>



Re: JDK bug or am I crazy ?

2000-12-01 Thread Louis Tribble

[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
> I spent many hours trying to fix a bug in tomcat3.3. I'm now down to
> DependManager, and I really have no idea what's happening.
> 
> There is a method:
> 
> boolean shouldReload() {}
> 
> All return statements are:
> "return expired;", where expired is an object property ( no local
> variables - the class doesn't extend and it's not extended ).
> 
> I do a println(expired) just before every "return expired;" and it prints
> "false".
> 
> I do a println(expired) after the method returns - it's still "false".
> 
> The only problem is that the returned value is "true" - even if the
> function returns a value that is false before and after the return
> statement. ( the variable is final, and there is only one place that
> sets it true, and that point is never reached ).
> 
> This doesn't happen if I use IBM JDK1.3 - only with Blackdown 1.2.2 ( FCS,
> BETA ).
> 
> VERY, VERY SCARRY !!!

Does disabling the JIT help any? ( -Djava.compiler= )

Louis
-- 

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Louis Tribble [EMAIL PROTECTED]
Metamata, Inc.   http://www.metamata.com
Tools for serious Java developers.   +1 510 796 0915
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>



Re: Recent Tomcat Download Stats

2000-11-27 Thread Louis Tribble

Louis Tribble wrote:
> 
> Presumably when 3.2 goes final, there will be a surge.
> 
> Also, 4.0-m5 (this weekend or so) will be the first Tomcat 4.0
> "milestone" (alpha) that has the connectors to run with Apache.
> 
> "Craig R. McClanahan" wrote:
> > PS:  Tomcat 4.0-m4 just went over 10,000 downloads of the binary distribution
> > (since 11/01/2000).  Tomcat 3.2-b7 and 3.2-b8 have totalled 8,095 downloads
> > (undoubtedly with some overlap) in roughly half that amount of time.  In both
> > cases, there are an additional unknown number of people keeping up via source
> > distributions, nightly builds, and/or anonymous CVS access.

Oops, sorry about that. Usually, I know the difference between Reply
and Forward. Although it does deserve more prominent mention than a P.S. 
in another thread :-)

Louis
-- 

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Louis Tribble [EMAIL PROTECTED]
Metamata, Inc.   http://www.metamata.com
Tools for serious Java developers.   +1 510 796 0915
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>



Recent Tomcat Download Stats

2000-11-27 Thread Louis Tribble

Presumably when 3.2 goes final, there will be a surge.

Also, 4.0-m5 (this weekend or so) will be the first Tomcat 4.0 
"milestone" (alpha) that has the connectors to run with Apache.

"Craig R. McClanahan" wrote:
> PS:  Tomcat 4.0-m4 just went over 10,000 downloads of the binary distribution
> (since 11/01/2000).  Tomcat 3.2-b7 and 3.2-b8 have totalled 8,095 downloads
> (undoubtedly with some overlap) in roughly half that amount of time.  In both
> cases, there are an additional unknown number of people keeping up via source
> distributions, nightly builds, and/or anonymous CVS access.
-- 

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Louis Tribble [EMAIL PROTECTED]
Metamata, Inc.   http://www.metamata.com
Tools for serious Java developers.   +1 510 796 0915
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>