DO NOT REPLY [Bug 5647] - AJP13 connector will not pass authentication requests
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5647. 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=5647 AJP13 connector will not pass authentication requests --- Additional Comments From [EMAIL PROTECTED] 2002-03-25 09:50 --- I've downloaded the latest 4.0.4beta2, and use it in combination with Apache 1.3.? from the latest OpenBSD distro. In my web.xml app, I request BASIC authentication. 1) If I put JkMount outside wirtual hosts in httpd.conf, it works. 2) After putting JkMount into one (name) virtual host, it fails (by failing, I mean: the popup windows comes up, but WITH THE WRONG resource name (the name of the virtual host:80) and authentication fails. Is that possible? Cedric -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 7191] - Tomcat 4 cannot handle JSP with utf-8 contentType header
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7191. 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=7191 Tomcat 4 cannot handle JSP with utf-8 contentType header [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2002-03-25 10:55 --- The comment of Gudmundur Hafsteinsson is right, and this is not really a bug. I was just confused by the exception message: Cannot read file: ze file. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 7191] - Tomcat 4 cannot handle JSP with utf-8 contentType header
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7191. 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=7191 Tomcat 4 cannot handle JSP with utf-8 contentType header [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|CLOSED -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 7191] - Tomcat 4 cannot handle JSP with utf-8 contentType header
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7191. 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=7191 Tomcat 4 cannot handle JSP with utf-8 contentType header --- Additional Comments From [EMAIL PROTECTED] 2002-03-25 13:00 --- It is not true. Since I am using the same in the same environment. Try to use UTF without hiphen. use either the attribute in jsp:page contentType = text/html;charset=UTF8 % or response.setContentType(text/html;charset=UTF8); It'll work. regards, Jeyasekar M -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator BasicAuthenticator.java
jfclere 02/03/25 05:58:35 Modified:catalina/src/share/org/apache/catalina/authenticator Tag: tomcat_40_branch BasicAuthenticator.java Log: Fix a typo. The Basic authentication was not working anymore due to this ;-(( Revision ChangesPath No revision No revision 1.10.2.3 +5 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java Index: BasicAuthenticator.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v retrieving revision 1.10.2.2 retrieving revision 1.10.2.3 diff -u -r1.10.2.2 -r1.10.2.3 --- BasicAuthenticator.java 23 Mar 2002 17:59:06 - 1.10.2.2 +++ BasicAuthenticator.java 25 Mar 2002 13:58:34 - 1.10.2.3 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v 1.10.2.2 2002/03/23 17:59:06 remm Exp $ - * $Revision: 1.10.2.2 $ - * $Date: 2002/03/23 17:59:06 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v 1.10.2.3 2002/03/25 13:58:34 jfclere Exp $ + * $Revision: 1.10.2.3 $ + * $Date: 2002/03/25 13:58:34 $ * * * @@ -84,7 +84,7 @@ * and Digest Access Authentication. * * @author Craig R. McClanahan - * @version $Revision: 1.10.2.2 $ $Date: 2002/03/23 17:59:06 $ + * @version $Revision: 1.10.2.3 $ $Date: 2002/03/25 13:58:34 $ */ public class BasicAuthenticator @@ -193,7 +193,7 @@ if (authorization == null) return (null); -if (!authorization.toLowerCase().startsWith(Basic )) +if (!authorization.toLowerCase().startsWith(basic )) return (null); authorization = authorization.substring(6).trim(); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[JTC] jkant and apxs
Hi to all, I take a look at jkant and build.xml for jk/native, since the current one didn't get CFLAGS from apxs and so the EAPI define is missing for Apache 1.3 built. I noticed there is provision for apxs in ApacheConfig.java and there is a getCflags() which return nothing (and appears to be never called by jkant. How could I modify this to have getCflags() used and called. FYI, getIncludes() should call apxs -q CFLAGS to get the required valid CFLAGS : on my Linux with Apache 1.3.23/mod_ssl 2.8.7 : apxs -q CFLAGS -O2 -m486 -fno-strength-reduce -DLINUX=22 -I/usr/include/db1 -DMOD_SSL=208107 -DEAPI -DEAPI_MM Did the current jkant use apxs to compile native jk for Apache 1.3/2.0 ? Regards -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 7445] New: - Can not set verbosity property of the FileLogger via server.xml configuration file.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7445. 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=7445 Can not set verbosity property of the FileLogger via server.xml configuration file. Summary: Can not set verbosity property of the FileLogger via server.xml configuration file. Product: Tomcat 4 Version: 4.0.3 Final Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Can not set verbosity property of the FileLogger via server.xml configuration file. Sequence of actions: 1. Adding lifecycle listener to the Host element Listener className=tim.core.catalina.SimpleLifecycleListener/ 2. Creatining logger Logger className=org.apache.catalina.logger.FileLogger verbosity=4 !--debug level-- directory=logs prefix=timi. suffix=.log timestamp=true/ 3. In the lifecycleEvent method of the LifecycleListener writing Host host = (Host)event.getLifecycle(); host.getLogger().log(CURRENT verbosity level is + host.getLogger().getVerbosity()); AND ALWAYS GETING 1!!! Why? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java
jfclere 02/03/25 06:51:10 Modified:catalina/src/share/org/apache/catalina/loader Tag: tomcat_40_branch WebappLoader.java Log: Another very bad typo ;-(( Revision ChangesPath No revision No revision 1.12.2.7 +5 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java Index: WebappLoader.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v retrieving revision 1.12.2.6 retrieving revision 1.12.2.7 diff -u -r1.12.2.6 -r1.12.2.7 --- WebappLoader.java 22 Mar 2002 17:30:50 - 1.12.2.6 +++ WebappLoader.java 25 Mar 2002 14:51:09 - 1.12.2.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v 1.12.2.6 2002/03/22 17:30:50 jfclere Exp $ - * $Revision: 1.12.2.6 $ - * $Date: 2002/03/22 17:30:50 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v 1.12.2.7 2002/03/25 14:51:09 jfclere Exp $ + * $Revision: 1.12.2.7 $ + * $Date: 2002/03/25 14:51:09 $ * * * @@ -119,7 +119,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.12.2.6 $ $Date: 2002/03/22 17:30:50 $ + * @version $Revision: 1.12.2.7 $ $Date: 2002/03/25 14:51:09 $ */ public class WebappLoader @@ -1279,7 +1279,7 @@ } // Handle a need for reloading -if (!started) +if (started) notifyContext(); break; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticatorBasicAuthenticator.java
Clere, Jean-Frederic wrote: Typo Basic is not basic. ;-((( Should we retag 4.0.4B2? I have fixed another one... In catalina/src/share/org/apache/catalina/loader/WebappLoader.java !started instead of started. Cheers Jean-frederic [EMAIL PROTECTED] wrote: remm02/03/23 09:59:06 Modified:catalina/src/share/org/apache/catalina/authenticator Tag: tomcat_40_branch BasicAuthenticator.java Log: - Fix 7344. Revision ChangesPath No revision No revision 1.10.2.2 +5 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java Index: BasicAuthenticator.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v retrieving revision 1.10.2.1 retrieving revision 1.10.2.2 diff -u -r1.10.2.1 -r1.10.2.2 --- BasicAuthenticator.java19 Feb 2002 17:13:26 -1.10.2.1 +++ BasicAuthenticator.java23 Mar 2002 17:59:06 -1.10.2.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v 1.10.2.1 2002/02/19 17:13:26 craigmcc Exp $ - * $Revision: 1.10.2.1 $ - * $Date: 2002/02/19 17:13:26 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v 1.10.2.2 2002/03/23 17:59:06 remm Exp $ + * $Revision: 1.10.2.2 $ + * $Date: 2002/03/23 17:59:06 $ * * * @@ -84,7 +84,7 @@ * and Digest Access Authentication. * * @author Craig R. McClanahan - * @version $Revision: 1.10.2.1 $ $Date: 2002/02/19 17:13:26 $ + * @version $Revision: 1.10.2.2 $ $Date: 2002/03/23 17:59:06 $ */ public class BasicAuthenticator @@ -193,7 +193,7 @@ if (authorization == null) return (null); -if (!authorization.startsWith(Basic )) +if (!authorization.toLowerCase().startsWith(Basic )) return (null); authorization = authorization.substring(6).trim(); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JNDIRealm, Bug 4352 and CLIENT-CERT authentication
Hi, Apologies in advance for my errors - I'm a newbie to contributing code rather than just downloading it. As I understand things, I cannot use a JNDI realm with CLIENT-CERT authentication at the moment (very similiar to BUG 4352, which describes a similar problem for JDBCRealm). I've therefore tried to modify org.apache.catalina.realm.JNDIRealm and I was wondering if someone could give me some advice, please? The situation: I had CLIENT-CERT working with certificates from our PKI and MemoryRealm to provide user-to-role mapping. I tried to replace the MemoryRealm part with the LDAP directory that's part of our PKI using JNDIRealm. Unfortunately, the getPrincipal(String username) method within JNDIRealm just returns null at the moment. Part of the solution: I've modified JNDIRealm and 'fixed' things but my code is a bit 'Mickey Mouse'. The problem is that to build a GenericPrincipal I need the user's credentials and this makes me nervous for two reasons: 1) Its supposed to be a string. I guess this is because for 99% of the time it would be a password. This makes no sense for a chain of certificates, though. 2) I don't think there is a way of getting hold of the certificates from just a username. Technically, I could get them from our PKI directory using the userCertificate attribute but there's no guarantee that this would be the same certificate that the user presented. More importantly, I don't think many people would want to be tied to our PKI! :) I have the code for what I've implemented, which just builds a principal with 'null' credentials (yuk). This works with superficial testing but I don't like it because I'm always looking over my shoulder for the 'NullPointer' exception. How am I supposed to do this? Am I missing something? Thanks for your help (and patience). Regards, Richard Priestley -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 7442] - Could the release guy please make sure that to include the actual release note for the release?
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7442. 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=7442 Could the release guy please make sure that to include the actual release note for the release? [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2002-03-25 17:47 --- As pointed out countless times, 4.0.3 is the same as 4.0.2, with the addition of the publicized security fix. All other releases include the release notes document. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Wrong BUILDING.txt
On Sat, Mar 23, 2002 at 02:03:39PM +0100, Jose M. Palomar wrote: BUILDING.txt documentation file of CVS Tomcat 4 mentions the download of package commons-daemon. I've browsed builds directories searching for it and It was missing. What package replace this? It's in the jakarta-commons-sandbox CVS module. Doesn't look like it's being built nightly, so I think CVS is your only option. In theory, you can get any Gump-built jar from http://gump.covalent.net/jars/latest/, but it seems to be down ATM. --Jeff -- Jose M. Palomar www.talika.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomcat 4.1 - 3/7 and 3/23 build jndi contribute alias host
Hello; We have a jndi source written for manager which works with Netware / NDS. I would like to contribute it so it can be intergrated with current builds. It works with the 3-7 build, and of course now would have to be re-written because of changes in the latests builds. Perhaps it can be integrated in such a way that will be acceptable for the project. If one developer wishes to have the source, contact me directly and I'll send it to you. I have a question on alias with tomcat. I create an alias host, ie www.acsfriends.org. This is setup as a jsp site. When you enter the raw domain, without the www, it is taking you to the tomcat startup page... everything seems right, I am not sure if it is an apache bug or tomcat bug.. or me dummy bug.. thanks todd -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH] TC 4.0/Coyote locale parsing issue
Hi, When dealing with preferred locales from a client (Accept-Language), the CoyoteRequest class (org.apache.coyote.tomcat4) doesn't correctly handle locales with variants (i.e. en-IE-EURO). RFC 2616 states that the following for language-range of Accept-Language: language-range = ( ( 1*8ALPHA *( - 1*8ALPHA ) ) | * ) So it seems that variants coming in from a client are legal (provided I've read the BNF properly) The attached patch seems to correct the issue. -rl Index: CoyoteRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v retrieving revision 1.11 diff -u -r1.11 CoyoteRequest.java --- CoyoteRequest.java 19 Mar 2002 20:34:41 - 1.11 +++ CoyoteRequest.java 25 Mar 2002 14:34:54 - @@ -1987,17 +1987,27 @@ // Extract the language and country for this entry String language = null; String country = null; +String variant = null; int dash = entry.indexOf('-'); if (dash 0) { language = entry; country = ; +variant = ; } else { language = entry.substring(0, dash); country = entry.substring(dash + 1); +int vDash = country.indexOf('-'); +if (vDash 0) { +String cTemp = country.substring(0, vDash); +variant = country.substring(vDash + 1); +country = cTemp; +} else { +variant = ; +} } // Add a new Locale to the list of Locales for this quality level -Locale locale = new Locale(language, country); +Locale locale = new Locale(language, country, variant); Double key = new Double(-quality); // Reverse the order ArrayList values = (ArrayList) locales.get(key); if (values == null) { -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Question about jsp:include/ implementation.
I noticed that the implementation of jsp:include/ uses a RequestDispatcher.include() to include the content. It appears to pass on the request from the calling the page. Doesn't this mean that the parameters passed to the including page will be made available to the included page? When you use the param/ tags with the JSP include, it adds them to the URL as a query string. It doesn't appear to do anything to pre-existing parameters. Thanks, Bob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Wrong BUILDING.txt
That's it. Thanx. Jeff Turner wrote: On Sat, Mar 23, 2002 at 02:03:39PM +0100, Jose M. Palomar wrote: BUILDING.txt documentation file of CVS Tomcat 4 mentions the download of package commons-daemon. I've browsed builds directories searching for it and It was missing. What package replace this? It's in the jakarta-commons-sandbox CVS module. Doesn't look like it's being built nightly, so I think CVS is your only option. In theory, you can get any Gump-built jar from http://gump.covalent.net/jars/latest/, but it seems to be down ATM. --Jeff -- Jose M. Palomar www.talika.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Jose M. Palomar www.talika.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PLAN] New Jasper
As I have announced here before, I have been working on rewriting part of Jasper. There are several goals for the new Jasper: 1. To reorganize/simplify parsing and code generation to make it more maintainable and yet runs faster. 2. To be used as a basis for reference implementation for JSP1.3. 3. To be used as a basis for performance optimizations, especially with custom tags. The majority of work has been concentrated on the compiler engine: the parser, the syntax checker, the attribute validator, and the code generator. Most of the utilities (except those related to parsing) and compiler environments (e.g. taglib infos), and runtimes have not been changed. The major change to the compiler has been the introduction of nodes as an internal representation of a JSP page or JSP document. Nodes are created by the parsers; and they are read, annotated, or transformed by other phases of the compiler. The compiler has added some new features (e.g. JSP id, pluggable error handlers); and it conforms the specs better, in terms of parsing and syntax error checking. Not much has changed in the servlet (java) file produced by the code generator, to maintain backward compatibility. Of couse this will be changed, as we move to goal 2 and 3. I have been doing it so far in my own sandbox. The reason for this is not to keep it a secret, but to avoid de-stablizing the current tomcat, since a lot of my early work was mainly experimental. There have been interests recently in making the new Jasper public, so I am going to do that, even though it is not ready to replace the current jasper yet. My plan is to create a new jasper directory (jasper2) under jakarta-tomcat-4.0, and to modify build.xml to allow for building jasper from sources under either jasper(the default) or jasper2 (the new jasper). This arrangement allows both the existing jasper and the new jasper to coexist and be co-developed without affecting each other. One drawback is that some files are duplicated in both directories and bugs fixed in one need to be duplicated in the other. But hopefully such an arranagement is only temporary and when the new jasper is in good enough shape, it will replace the existing one. I plan to put back the new japser source tree in a day or two. If anyone has comments, concerns, or objections, please let me know. Of course, anyone interested in contributing to the new jasper development is also welcome. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [PLAN] New Jasper
De: Kin-Man Chung [mailto:[EMAIL PROTECTED]] Enviado el: martes 26 de marzo de 2002 0:37 Nice to hear that, one comment, there is a jakarta-tomcat-jasper repository with code Costin and Mel did some time ago as an initial effort to refactor the 3.3 Jasper, i dont know which is the state of the code there but maybe it's good idea to use it for your effort.. Coyote builds from a parallel repostory, so the build file can be borrowed from there.. What do you think? Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [PLAN] New Jasper
On Tue, 26 Mar 2002, Ignacio J. Ortega wrote: De: Kin-Man Chung [mailto:[EMAIL PROTECTED]] Enviado el: martes 26 de marzo de 2002 0:37 Nice to hear that, one comment, there is a jakarta-tomcat-jasper repository with code Costin and Mel did some time ago as an initial effort to refactor the 3.3 Jasper, i dont know which is the state of the code there but maybe it's good idea to use it for your effort.. The state of my effort is bad - I have no time for it right now. Our focus was more on the runtime optimizations - so it may be possible to merge at least the tag reuse and few other things. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/admin/host host.jsp
manveen 02/03/25 16:04:45 Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context AddContextAction.java ContextForm.java SaveContextAction.java webapps/admin/context context.jsp webapps/admin/host host.jsp Log: * Implemented add context operation * Enabled selecting add context through host. (now delete and add contexts operations both are possible through admin tool) * added method toString() to ContextForm to print out values in the form. Revision ChangesPath 1.2 +6 -6 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/AddContextAction.java Index: AddContextAction.java === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/AddContextAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AddContextAction.java 24 Mar 2002 21:41:58 - 1.1 +++ AddContextAction.java 26 Mar 2002 00:04:44 - 1.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/AddContextAction.java,v 1.1 2002/03/24 21:41:58 manveen Exp $ - * $Revision: 1.1 $ - * $Date: 2002/03/24 21:41:58 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/AddContextAction.java,v 1.2 2002/03/26 00:04:44 manveen Exp $ + * $Revision: 1.2 $ + * $Date: 2002/03/26 00:04:44 $ * * * @@ -81,7 +81,7 @@ * The codeAction/code that sets up emAdd Context/em transactions. * * @author Manveen Kaur - * @version $Revision: 1.1 $ $Date: 2002/03/24 21:41:58 $ + * @version $Revision: 1.2 $ $Date: 2002/03/26 00:04:44 $ */ public class AddContextAction extends Action { @@ -148,11 +148,11 @@ contextFm.setPath(); contextFm.setDebugLvl(0); //loader initialization -contextFm.setLdrCheckInterval(0); +contextFm.setLdrCheckInterval(15); contextFm.setLdrDebugLvl(0); contextFm.setLdrReloadable(false); //manager initialization -contextFm.setMgrCheckInterval(0); +contextFm.setMgrCheckInterval(60); contextFm.setMgrDebugLvl(0); contextFm.setMgrMaxSessions(-1); contextFm.setMgrSessionIDInit(); 1.4 +59 -8 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/ContextForm.java Index: ContextForm.java === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/ContextForm.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ContextForm.java 23 Mar 2002 22:13:42 - 1.3 +++ ContextForm.java 26 Mar 2002 00:04:44 - 1.4 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/ContextForm.java,v 1.3 2002/03/23 22:13:42 manveen Exp $ - * $Revision: 1.3 $ - * $Date: 2002/03/23 22:13:42 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/ContextForm.java,v 1.4 2002/03/26 00:04:44 manveen Exp $ + * $Revision: 1.4 $ + * $Date: 2002/03/26 00:04:44 $ * * * @@ -74,7 +74,7 @@ * Form bean for the context page. * * @author Manveen Kaur - * @version $Revision: 1.3 $ $Date: 2002/03/23 22:13:42 $ + * @version $Revision: 1.4 $ $Date: 2002/03/26 00:04:44 $ */ public final class ContextForm extends ActionForm { @@ -159,7 +159,7 @@ /** * The text for the loader check interval. */ -private String ldrCheckInterval = 0; +private String ldrCheckInterval = 15; /** * The text for the loader Debug level. @@ -174,7 +174,7 @@ /** * The text for the session manager check interval. */ -private String mgrCheckInterval = 0; +private String mgrCheckInterval = 60; /** * The text for the session manager Debug level. @@ -666,6 +666,7 @@ public void reset(ActionMapping mapping, HttpServletRequest request) { this.objectName = null; +this.parentObjectName = null; this.loaderObjectName = null; this.managerObjectName = null; @@ -679,17 +680,67 @@ this.reloadable = false; // loader properties -this.ldrCheckInterval = 0; +this.ldrCheckInterval = 15; this.ldrDebugLvl = 0;
RE: [PLAN] New Jasper
Thanks for the pointer. I'll look at both places to see if there are codes/ideas I can borrow. I also would welcome ideas or suggestion about what and how to make jasper better. Pier's is the first complain that I've heard about jasper translation perfromance. :-) Date: Tue, 26 Mar 2002 00:47:12 +0100 From: Ignacio J. Ortega [EMAIL PROTECTED] Subject: RE: [PLAN] New Jasper To: 'Tomcat Developers List' [EMAIL PROTECTED], 'Kin-Man Chung' [EMAIL PROTECTED] MIME-version: 1.0 X-Priority: 3 Delivered-to: mailing list [EMAIL PROTECTED] Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N List-Post: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Id: Tomcat Developers List tomcat-dev.jakarta.apache.org De: Kin-Man Chung [mailto:[EMAIL PROTECTED]] Enviado el: martes 26 de marzo de 2002 0:37 Nice to hear that, one comment, there is a jakarta-tomcat-jasper repository with code Costin and Mel did some time ago as an initial effort to refactor the 3.3 Jasper, i dont know which is the state of the code there but maybe it's good idea to use it for your effort.. Coyote builds from a parallel repostory, so the build file can be borrowed from there.. What do you think? Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PLAN] New Jasper
On Mon, 25 Mar 2002, Kin-Man Chung wrote: I have noticed that the current Jasper does a lot of string manipulations very slowly, e.g. there are unnecessary copying or concatenations, and the uses of String where StringBuffer should be used. Hopefully I can avoid all of these. But I don't have high hopes that Jasper performance can be improved to the point that an user will notice, because the time spent in Jasper is probably small compared with that spent in javac. Now if we could have jasper generate byte code directly... I wouldn't worry too much about this kind of optimizations - the page compilation happens only once and it's quite easy to pre-compile the pages with jspc. The place where optimizations do matter the most is the runtime - I would be happy with a generator/compiler that is slower but generates faster code. Even if it is possible to use BCEL to generate bytecodes directly, I think this would be a huge waste of time if done before the runtime is optimized. A clean generator that makes it easier to improve the generated code is better than the fastest generator. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PLAN] New Jasper
I have noticed that the current Jasper does a lot of string manipulations very slowly, e.g. there are unnecessary copying or concatenations, and the uses of String where StringBuffer should be used. Hopefully I can avoid all of these. But I don't have high hopes that Jasper performance can be improved to the point that an user will notice, because the time spent in Jasper is probably small compared with that spent in javac. Now if we could have jasper generate byte code directly... Date: Mon, 25 Mar 2002 23:40:05 + From: Pier Fumagalli [EMAIL PROTECTED] Subject: Re: [PLAN] New Jasper To: Tomcat Developers List [EMAIL PROTECTED] MIME-version: 1.0 Content-transfer-encoding: 7bit Delivered-to: mailing list [EMAIL PROTECTED] Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm User-Agent: Microsoft-Entourage/10.0.0.1309 X-Antivirus-Data: Virus data file v4189 created Mar 06 2002 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N List-Post: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Id: Tomcat Developers List tomcat-dev.jakarta.apache.org Kin-Man Chung [EMAIL PROTECTED] wrote: I plan to put back the new japser source tree in a day or two. If anyone has comments, concerns, or objections, please let me know. Of course, anyone interested in contributing to the new jasper development is also welcome. YES PLEASE :) It's quite some time I'm waiting for this... We have a pretty heavily loaded website all using JSP, and the current jasper is just so slow to even considering using it (not the actual servlet, but the code generated). Can't wait to try it out... Pier -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PLAN] New Jasper
On Mon, 25 Mar 2002, Kin-Man Chung wrote: I have noticed that the current Jasper does a lot of string manipulations very slowly, e.g. there are unnecessary copying or concatenations, and the uses of String where StringBuffer should be used. Hopefully I can avoid all of these. But I don't have high hopes that Jasper performance can be improved to the point that an user will notice, because the time spent in Jasper is probably small compared with that spent in javac. Now if we could have jasper generate byte code directly... I wouldn't worry too much about this kind of optimizations - the page compilation happens only once and it's quite easy to pre-compile the pages with jspc. The place where optimizations do matter the most is the runtime - I would be happy with a generator/compiler that is slower but generates faster code. Even if it is possible to use BCEL to generate bytecodes directly, I think this would be a huge waste of time if done before the runtime is optimized. A clean generator that makes it easier to improve the generated code is better than the fastest generator. Costin I happen to agree with you. My initial effort in performance improvement would certainly be on the generated codes. I wasn't really serious when I suggested that Jasper generates byte codes. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PLAN] New Jasper
On Mon, 25 Mar 2002, Kin-Man Chung wrote: I wasn't really serious when I suggested that Jasper generates byte codes. Xalan is doing that already ( actually XSLTC ), and it's not very difficult since we generate quite simple code, unlikely to be optimized by javac too much. It'll work only for 'pure' pages, without % % - if the code uses scriptlets it has to fall back to javac. It can be done - but this should be at the very end of the todo list. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java
manveen 02/03/25 17:23:26 Modified:catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java Log: fix for createWebappLoader, createStandardManager, create*Realms. Revision ChangesPath 1.21 +19 -18 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java Index: MBeanFactory.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- MBeanFactory.java 22 Mar 2002 19:27:26 - 1.20 +++ MBeanFactory.java 26 Mar 2002 01:23:25 - 1.21 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v 1.20 2002/03/22 19:27:26 amyroh Exp $ - * $Revision: 1.20 $ - * $Date: 2002/03/22 19:27:26 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v 1.21 2002/03/26 01:23:25 manveen Exp $ + * $Revision: 1.21 $ + * $Date: 2002/03/26 01:23:25 $ * * * @@ -63,7 +63,6 @@ package org.apache.catalina.mbeans; - import javax.management.MBeanException; import javax.management.MBeanServer; import javax.management.ObjectName; @@ -116,7 +115,7 @@ * codeorg.apache.catalina.core.StandardServer/code component./p * * @author Amy Roh - * @version $Revision: 1.20 $ $Date: 2002/03/22 19:27:26 $ + * @version $Revision: 1.21 $ $Date: 2002/03/26 01:23:25 $ */ public class MBeanFactory extends BaseModelMBean { @@ -273,13 +272,12 @@ // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); String type = pname.getKeyProperty(type); -// FIX ME // String tname = findObjectName(type); String tname = type; Server server = ServerFactory.getServer(); Service service = server.findService(pname.getKeyProperty(service)); Engine engine = (Engine) service.getContainer(); -if (tname.equals(StandardContext)) { +if (tname.equals(Context)) { Host host = (Host) engine.findChild(pname.getKeyProperty(host)); Context context = (Context) host.findChild(pname.getKeyProperty(path)); @@ -382,11 +380,12 @@ // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); String type = pname.getKeyProperty(type); -String tname = findObjectName(type); +// String tname = findObjectName(type); +String tname = type; Server server = ServerFactory.getServer(); Service service = server.findService(pname.getKeyProperty(service)); Engine engine = (Engine) service.getContainer(); -if (tname.equals(StandardContext)) { +if (tname.equals(Context)) { Host host = (Host) engine.findChild(pname.getKeyProperty(host)); Context context = (Context) host.findChild(pname.getKeyProperty(path)); @@ -423,11 +422,12 @@ // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); String type = pname.getKeyProperty(type); -String tname = findObjectName(type); +// String tname = findObjectName(type); +String tname = type; Server server = ServerFactory.getServer(); Service service = server.findService(pname.getKeyProperty(service)); Engine engine = (Engine) service.getContainer(); -if (tname.equals(StandardContext)) { +if (tname.equals(Context)) { Host host = (Host) engine.findChild(pname.getKeyProperty(host)); Context context = (Context) host.findChild(pname.getKeyProperty(path)); @@ -464,11 +464,12 @@ // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); String type = pname.getKeyProperty(type); -String tname = findObjectName(type); +// String tname = findObjectName(type); +String tname = type; Server server = ServerFactory.getServer(); Service service = server.findService(pname.getKeyProperty(service)); Engine engine = (Engine) service.getContainer(); -if (tname.equals(StandardContext)) { +if (tname.equals(Context)) { Host host = (Host) engine.findChild(pname.getKeyProperty(host)); Context context = (Context) host.findChild(pname.getKeyProperty(path)); @@ -839,7 +840,8 @@ Server server =
cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h jk_config.h jk_env.h jk_logger.h
costin 02/03/25 18:55:15 Modified:jk/native2/include jk_channel.h jk_config.h jk_env.h jk_logger.h Log: Few cosmetic ( and not only ) changes. Save the localName and the object pool in jk_bean - this eliminates a lot of duplicated code. Added the tmpPool to env ( see next commit for details ) Added a vargs log method. Revision ChangesPath 1.8 +1 -0 jakarta-tomcat-connectors/jk/native2/include/jk_channel.h Index: jk_channel.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_channel.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- jk_channel.h 18 Mar 2002 17:56:40 - 1.7 +++ jk_channel.h 26 Mar 2002 02:55:15 - 1.8 @@ -113,6 +113,7 @@ send/receive flow is hard to replicate on jni ) */ int is_stream; +struct jk_pool *pool; struct jk_worker *worker; 1.3 +2 -0 jakarta-tomcat-connectors/jk/native2/include/jk_config.h Index: jk_config.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_config.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_config.h 23 Mar 2002 16:52:18 - 1.2 +++ jk_config.h 26 Mar 2002 02:55:15 - 1.3 @@ -150,6 +150,8 @@ struct jk_workerEnv *workerEnv; struct jk_map *map; +char *file; + char *section; }; 1.11 +56 -27jakarta-tomcat-connectors/jk/native2/include/jk_env.h Index: jk_env.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_env.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- jk_env.h 25 Mar 2002 03:32:35 - 1.10 +++ jk_env.h 26 Mar 2002 02:55:15 - 1.11 @@ -91,6 +91,7 @@ typedef struct jk_bean jk_bean_t; typedef struct jk_env jk_env_t; + /** * Factory used to create all jk objects. Factories are registered with * jk2_env_registerFactory. The 'core' components are registered in @@ -131,11 +132,15 @@ struct jk_bean { /* Type of this object */ -const char *type; +char *type; /* Name of the object */ -const char *name; +char *name; + +/* Local part of the name + */ +char *localName; /* The wrapped object */ @@ -149,6 +154,13 @@ */ struct jk_map *settings; +/* Object pool. The jk_bean and the object itself are created in this + * pool. If this pool is destroyed or recycled, the object and all its + * data are destroyed as well ( assuming the pool corectly cleans child pools + * and object data are not created explicitely in a different pool ). + */ +struct jk_pool *pool; + /* Temp - will change !*/ /* Attributes supported by getAttribute method */ char **getAttributeInfo; @@ -196,9 +208,27 @@ env is released ( the equivalent of 'detach' ). Can be used for temp. allocation of small objects. */ -struct jk_pool *localPool; +struct jk_pool *tmpPool; +/* Get/release ent */ + +/** Get an env instance. Must be called from each thread. The object + * can be reused in the thread, or it can be get/released on each used. + * + * The env will store the exception status and the tmp pool - the pool will + * be recycled when the env is released, use it only for tmp things. + */ +struct jk_env *(*getEnv)(struct jk_env *parent); + +/** Release the env instance. The tmpPool will be recycled. + */ +int (*releaseEnv)(struct jk_env *parent, struct jk_env *chld); + +/* Exceptions */ + /* Exceptions. + * TODO: create a 'stack trace' (i.e. a stack of errors ) + * TODO: set 'error state' * XXX Not implemented/not used */ void (JK_METHOD *jkThrow)( jk_env_t *env, @@ -222,7 +252,10 @@ * XXX Not implemented/not used */ void (JK_METHOD *jkClearException)( jk_env_t *env ); - + +/* Object management */ +/* Register types, create instances, get by name */ + /** Create an object using the name. Use the : separated prefix as * type. XXX This should probably replace createInstance. * @@ -233,31 +266,34 @@ */ struct jk_bean *(*createBean)( struct jk_env *env, struct jk_pool *parentPool, char *objName ); +/** Same as
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c
costin 02/03/25 18:58:30 Modified:jk/native2/common jk_channel_socket.c Log: Parse the name of the channel, extract host an port. No longer need to specify the port and host, just use the 'normal' convention. ( same thing is done in worker - so it doesn't matter what you configure, channel or worker, you'll have to do it only once and the name is enough ) Create the worker automatically if none specified. Revision ChangesPath 1.17 +78 -33jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c Index: jk_channel_socket.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- jk_channel_socket.c 24 Mar 2002 19:24:26 - 1.16 +++ jk_channel_socket.c 26 Mar 2002 02:58:30 - 1.17 @@ -114,17 +114,17 @@ short port, struct sockaddr_in *rc); -static int JK_METHOD jk2_channel_socket_close(jk_env_t *env, jk_channel_t *_this, +static int JK_METHOD jk2_channel_socket_close(jk_env_t *env, jk_channel_t *ch, jk_endpoint_t *endpoint); static int jk2_channel_socket_setAttribute(jk_env_t *env, jk_bean_t *mbean, char *name, void *valueP) { -jk_channel_t *_this=(jk_channel_t *)mbean-object; +jk_channel_t *ch=(jk_channel_t *)mbean-object; char *value=(char *)valueP; jk_channel_socket_private_t *socketInfo= - (jk_channel_socket_private_t *)(_this-_privatePtr); + (jk_channel_socket_private_t *)(ch-_privatePtr); if( strcmp( host, name ) == 0 ) { socketInfo-host=value; @@ -139,28 +139,72 @@ /** resolve the host IP ( jk_resolve ) and initialize the channel. */ static int JK_METHOD jk2_channel_socket_init(jk_env_t *env, - jk_channel_t *_this ) + jk_channel_t *ch ) { jk_channel_socket_private_t *socketInfo= - (jk_channel_socket_private_t *)(_this-_privatePtr); + (jk_channel_socket_private_t *)(ch-_privatePtr); int rc; char *host=socketInfo-host; -short port=socketInfo-port; + +/* Use information from name */ +if( socketInfo-port=0 ) { +char *localName=ch-mbean-localName; +if( *localName=='\0' ) { +/* Empty local part */ +socketInfo-port=8009; +if( socketInfo-host==NULL) socketInfo-host=DEFAULT_HOST; +} else { +char *portIdx=strchr( localName, ':' ); +if( portIdx==NULL || portIdx[1]=='\0' ) { +socketInfo-port=8009; +} else { +portIdx++; +socketInfo-port=atoi( portIdx ); +} +if( socketInfo-host==NULL ) { +socketInfo-host=ch-pool-calloc( env, ch-pool, strlen( localName ) + 1 ); +if( portIdx==NULL ) { +strcpy( socketInfo-host, localName ); +} else { +strncpy( socketInfo-host, localName, portIdx-localName-1 ); +} +} +} + +} -if( port=0 ) -port=8009; +if( socketInfo-port=0 ) +socketInfo-port=8009; -if( host==NULL ) -host=DEFAULT_HOST; +if( socketInfo-host==NULL ) +socketInfo-host=DEFAULT_HOST; -rc=jk2_channel_socket_resolve( env, host, port, socketInfo-addr ); +rc=jk2_channel_socket_resolve( env, socketInfo-host, socketInfo-port, socketInfo-addr ); if( rc!= JK_TRUE ) { env-l-jkLog(env, env-l, JK_LOG_ERROR, jk2_channel_socket_init: - can't resolve %s:%d errno=%d\n, host, port, errno ); + can't resolve %s:%d errno=%d\n, socketInfo-host, socketInfo-port, errno ); } + +if( ch-worker == NULL ) { +jk_bean_t *jkb; + +env-l-jkLog(env, env-l, JK_LOG_INFO, + channel_socket.init(): create default worker for %s\n, ch-mbean-name ); + +jkb=env-createBean2(env, ch-pool, worker.ajp13, ch-mbean-localName ); +ch-worker=jkb-object; +ch-worker-channelName=ch-mbean-name; +ch-worker-channel=ch; + +/* XXX Set additional parameters - use defaults otherwise */ + +ch-worker-init( env, ch-worker); +} + env-l-jkLog(env, env-l, JK_LOG_INFO, - channel_socket.init(): %s:%d for %s\n, host, - port, _this-worker-mbean-name ); +
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_config.c jk_logger_file.c
costin 02/03/25 19:00:09 Modified:jk/native2/common jk_config.c jk_logger_file.c Log: Store the name of the config file ( to write back modified info ) Add the vargs method in logger. Revision ChangesPath 1.7 +8 -3 jakarta-tomcat-connectors/jk/native2/common/jk_config.c Index: jk_config.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_config.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- jk_config.c 25 Mar 2002 03:35:11 - 1.6 +++ jk_config.c 26 Mar 2002 03:00:09 - 1.7 @@ -58,7 +58,7 @@ /*** * Description: General purpose config object * * Author: Gal Shachor [EMAIL PROTECTED] * - * Version: $Revision: 1.6 $ * + * Version: $Revision: 1.7 $ * ***/ #include jk_global.h @@ -98,6 +98,8 @@ config.setConfig(): Can't find config file %s, workerFile ); return JK_FALSE; } + +cfg-file=workerFile; /** Read worker files */ @@ -270,7 +272,10 @@ /* env-l-jkLog( env, env-l, JK_LOG_INFO, config: set %s / %s / %s=%s\n, */ /*mbean-name, name, pname, val); */ - +if( strcmp( name, name ) == 0 ) { +return JK_TRUE; +} + if(mbean-setAttribute) return mbean-setAttribute( env, mbean, name, val ); return JK_FALSE; @@ -296,7 +301,7 @@ return status; } -mbean=env-getMBean( env, objName ); +mbean=env-getBean( env, objName ); if( mbean==NULL ) { mbean=env-createBean( env, cfg-pool, objName ); } 1.16 +26 -10jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c Index: jk_logger_file.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- jk_logger_file.c 23 Mar 2002 17:23:15 - 1.15 +++ jk_logger_file.c 26 Mar 2002 03:00:09 - 1.16 @@ -59,7 +59,7 @@ * Description: Utility functions (mainly configuration) * * Author: Gal Shachor [EMAIL PROTECTED] * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.15 $ * + * Version: $Revision: 1.16 $ * ***/ #include jk_env.h @@ -204,15 +204,16 @@ } -static int jk2_logger_file_jkLog(jk_env_t *env, jk_logger_t *l, - const char *file, - int line, - int level, - const char *fmt, ...) +static int jk2_logger_file_jkVLog(jk_env_t *env, jk_logger_t *l, + const char *file, + int line, + int level, + char *fmt, + va_list args) { int rc = 0; -if( !file || !fmt) { +if( !file || !args) { return -1; } @@ -226,7 +227,6 @@ char buf[HUGE_BUFFER_SIZE]; #endif char *f = (char *)(file + strlen(file) - 1); -va_list args; int used = 0; while(f != file '\\' != *f '/' != *f) { @@ -260,7 +260,6 @@ return 0; /* [V] not sure what to return... */ } -va_start(args, fmt); #ifdef WIN32 rc = _vsnprintf(buf + used, HUGE_BUFFER_SIZE - used, fmt, args); #elif defined(NETWARE) /* until we get a vsnprintf function */ @@ -268,7 +267,6 @@ #else rc = vsnprintf(buf + used, HUGE_BUFFER_SIZE - used, fmt, args); #endif -va_end(args); l-log(env, l, level, buf); #ifdef NETWARE @@ -280,6 +278,23 @@ } + +static int jk2_logger_file_jkLog(jk_env_t *env, jk_logger_t *l, + const char *file, + int line, + int level, + const char *fmt, ...) +{ +va_list args; +int rc; + +va_start(args, fmt); +rc=jk2_logger_file_jkVLog( env, l, file, line, level,
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_uriEnv.c jk_uriMap.c
costin 02/03/25 19:03:01 Modified:jk/native2/common jk_uriEnv.c jk_uriMap.c Log: Update, remove excessive debugging. Revision ChangesPath 1.6 +3 -5 jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c Index: jk_uriEnv.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- jk_uriEnv.c 24 Mar 2002 19:24:26 - 1.5 +++ jk_uriEnv.c 26 Mar 2002 03:03:01 - 1.6 @@ -79,7 +79,7 @@ if( slash==NULL ) { env-l-jkLog( env, env-l, JK_LOG_ERROR, - At least a '/' must be included %s\n, name); + uriEnv.parseUri(): At least a '/' must be included %s\n, name); return JK_FALSE; } @@ -102,8 +102,8 @@ uriEnv-uri=uriEnv-pool-pstrdup(env, uriEnv-pool, n); jk2_uriEnv_init(env, uriEnv); -env-l-jkLog( env, env-l, JK_LOG_INFO, - Setting path %s for %s\n, n, name); +/* env-l-jkLog( env, env-l, JK_LOG_INFO, */ +/*uriEnv.parseUri() Setting path %s for %s\n, n, name); */ return JK_TRUE; } @@ -267,8 +267,6 @@ jk_pool_t *uriPool; int err; jk_uriEnv_t *uriEnv; - -env-l-jkLog(env, env-l, JK_LOG_INFO, uriEnv: Create URI %s %s \n, type, name ); uriPool=(jk_pool_t *)pool-create( env, pool, HUGE_POOL_SIZE); 1.20 +8 -6 jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c Index: jk_uriMap.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- jk_uriMap.c 23 Mar 2002 17:27:13 - 1.19 +++ jk_uriMap.c 26 Mar 2002 03:03:01 - 1.20 @@ -67,7 +67,7 @@ * servlet container. * * Author: Gal Shachor [EMAIL PROTECTED] - * Version: $Revision: 1.19 $ + * Version: $Revision: 1.20 $ */ #include jk_pool.h @@ -194,19 +194,21 @@ int err; jk_uriEnv_t *uriEnv; char *uriName; +jk_bean_t *jkb; uriName=(char *)uriMap-pool-calloc( env, uriMap-pool, (vhost==NULL ? 0 : strlen( vhost )) + (path==NULL ? 0 : strlen( path )) + + 10); -strcpy( uriName, uri: ); +strcpy( uriName, ); if( vhost != NULL ) strcat( uriName, vhost ); if( path != NULL ) strcat( uriName, path ); - -uriEnv=env-createInstance( env, uriMap-pool, uriEnv, uriName ); -if( uriEnv==NULL ) + +jkb=env-createBean2( env, uriMap-pool, uri, uriName ); +if( jkb==NULL || jkb-object==NULL ) return NULL; - +uriEnv=jkb-object; + uriEnv-workerEnv=uriMap-workerEnv; uriEnv-mbean-setAttribute( env, uriEnv-mbean, path, path ); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c
costin 02/03/25 19:02:32 Modified:jk/native2/common jk_env.c Log: Clean up, reorganization, implement missing features. The code calling env must get an env ( at least once per thread ). The env object is recycled and includes a tmp pool ( to be used for temp allocations, the pool is recycled when the env is released ). It also includes minimal support for exceptions, JNI style. ( not used right now ) The code to create and manage instances is more consistent and hopefully cleaner. Revision ChangesPath 1.16 +220 -102 jakarta-tomcat-connectors/jk/native2/common/jk_env.c Index: jk_env.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- jk_env.c 25 Mar 2002 03:35:11 - 1.15 +++ jk_env.c 26 Mar 2002 03:02:32 - 1.16 @@ -64,10 +64,14 @@ */ static void jk2_env_initEnv( jk_env_t *env, char *id ); -/* XXX We should have one env per thread to avoid sync problems. - The env will provide access to pools, etc +/* We should have one env per thread to avoid sync problems. + The env provides access to tmp pools, exception */ +/* Env management */ + +/** Public method, creates/get the global env + */ jk_env_t* JK_METHOD jk2_env_getEnv( char *id, jk_pool_t *pool ) { if( jk_env_globalEnv == NULL ) { jk_env_globalEnv=(jk_env_t *)pool-calloc( NULL, pool, sizeof( jk_env_t )); @@ -77,30 +81,53 @@ return jk_env_globalEnv; } -/* Implementation */ -static jk_env_t * JK_METHOD jk2_env_get( jk_env_t *env ) +/** Get a local env - either a new one or a recycled one + * XXX Try TLD too + */ +static jk_env_t * JK_METHOD jk2_env_get( jk_env_t *parentEnv ) { -return NULL; +jk_env_t *env=(jk_env_t *)parentEnv-envCache-get( parentEnv, parentEnv-envCache); +if( env == NULL ) { +jk_pool_t *parentPool=parentEnv-globalPool; +env=(jk_env_t *)parentPool-calloc( parentEnv, parentPool, sizeof( jk_env_t )); + +env-tmpPool=parentPool-create(parentEnv, parentPool, HUGE_POOL_SIZE);; + +env-registerFactory= parentEnv-registerFactory; +env-getByName= parentEnv-getByName; +env-getByName2= parentEnv-getByName2; +env-getBean2= parentEnv-getBean2; +env-getBean= parentEnv-getBean; +env-alias= parentEnv-alias; +env-createBean2= parentEnv-createBean2; +env-createBean= parentEnv-createBean; +env-getEnv= parentEnv-getEnv; +env-releaseEnv= parentEnv-releaseEnv; +env-jkClearException=parentEnv-jkClearException; +env-jkException=parentEnv-jkException; + +env-_registry=parentEnv-_registry; +env-_objects=parentEnv-_objects; +env-l=parentEnv-l; +env-globalPool=parentEnv-globalPool; +env-envCache=parentEnv-envCache; + +fprintf( stderr, Create env %d\n, env-id); +} +return env; } +/** Release the env ( clean and recycle ) + */ static int JK_METHOD jk2_env_put( jk_env_t *parent, jk_env_t *chld ) { - -return JK_TRUE; +chld-tmpPool-reset(parent, chld-tmpPool); +chld-jkClearException(chld); +return parent-envCache-put( parent, parent-envCache, chld); } -static jk_env_objectFactory_t JK_METHOD jk2_env_getFactory(jk_env_t *env, - const char *type ) -{ - if( type==NULL ) { - env-l-jkLog(env, env-l, JK_LOG_ERROR, - env.getFactory(): NullPointerException\n); - return NULL; - } - - return (jk_env_objectFactory_t)env-_registry-get( env, env-_registry, type); -} +/* Object management */ /** Create a jk component, using only the name. * Now things are simpler - the 'type' is the prefix, separated by ':' - no @@ -108,8 +135,6 @@ */ static jk_bean_t *jk2_env_createBean( jk_env_t *env, jk_pool_t *pool, char *objName ) { -jk_bean_t *w=NULL; -int i; char *type=NULL; void *obj; char *localName; @@ -119,122 +144,141 @@ type=objName; } else { /* Funny pointer arithmetic. I hope I got it right */ -type=pool-calloc( env, pool, localName - objName + 2 ); +type=env-tmpPool-calloc( env, env-tmpPool, localName - objName + 2 ); strncpy( type, objName, localName - objName ); } -/* for( i=0; i env-_registry-size( env, env-_registry ) ; i++ ) { */ -/* char *factName=env-_registry-nameAt( env, env-_registry, i ); */ -/* int
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_workerEnv.c
costin 02/03/25 19:03:43 Modified:jk/native2/common jk_workerEnv.c Log: Update for the interface changes. Remove the duplicated worker creation code, jk_env takes care of pool allocation. Revision ChangesPath 1.22 +29 -40jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c Index: jk_workerEnv.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- jk_workerEnv.c23 Mar 2002 17:27:13 - 1.21 +++ jk_workerEnv.c26 Mar 2002 03:03:43 - 1.22 @@ -59,7 +59,7 @@ * Description: Workers controller * * Author: Gal Shachor [EMAIL PROTECTED] * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.21 $ * + * Version: $Revision: 1.22 $ * ***/ #include jk_env.h @@ -172,19 +172,17 @@ jk_worker_t *w= wEnv-worker_map-valueAt( env, wEnv-worker_map, i ); int err; -if( w-init != NULL ) +if( w-init != NULL ) { err=w-init(env, w); -if(err!=JK_TRUE) { -if( w-destroy != NULL ) -w-destroy(env, w); -env-l-jkLog(env, env-l, JK_LOG_ERROR, - workerEnv.initWorkers() init failed for %s\n, - name); +if(err!=JK_TRUE) { +if( w-destroy != NULL ) +w-destroy(env, w); +env-l-jkLog(env, env-l, JK_LOG_ERROR, + workerEnv.initWorkers() init failed for %s\n, + name); +} } - -env-l-jkLog(env, env-l, JK_LOG_INFO, - workerEnv.initWorkers(): init ok %s\n, name); } return JK_TRUE; } @@ -204,9 +202,11 @@ char *name= registry-nameAt( env, registry, i ); if( strncmp( name, handler., 8 ) == 0 ) { -handler=(jk_handler_t *)env-createInstance(env, wEnv-pool, name, name ); -if( handler!=NULL ) -handler-init( env, handler, wEnv ); +jk_bean_t *jkb=env-createBean2(env, wEnv-pool, name, ); +if( jkb==NULL || jkb-object==NULL ) +continue; +handler=(jk_handler_t *)jkb-object; +handler-init( env, handler, wEnv ); } } } @@ -233,7 +233,7 @@ env-l-init( env, env-l ); -configFile=wEnv-initData-get( env, wEnv-initData, config.file ); +configFile=wEnv-config-file; env-l-jkLog(env, env-l, JK_LOG_ERROR, workerEnv.init() %s\n, configFile ); if( configFile == NULL ) { wEnv-config-setPropertyString( env, wEnv-config, @@ -416,7 +416,7 @@ } static jk_worker_t *jk2_workerEnv_createWorker(jk_env_t *env, -jk_workerEnv_t *wEnv, + jk_workerEnv_t *wEnv, char *type, char *name) { int err=JK_TRUE; @@ -424,6 +424,7 @@ jk_worker_t *w = NULL; jk_worker_t *oldW = NULL; jk_pool_t *workerPool; +jk_bean_t *jkb; /* First find if it already exists */ w=env-getByName( env, name ); @@ -433,38 +434,24 @@ name); return w; } - -workerPool=wEnv-pool-create(env, wEnv-pool, HUGE_POOL_SIZE); - -/* Each worker has it's own pool */ -if( type == NULL ) type=ajp13; +jkb=env-createBean(env, wEnv-pool, name ); -w=(jk_worker_t *)env-createInstance(env, workerPool, type, name ); - -if( w == NULL ) { +if( jkb == NULL || jkb-object==NULL ) { env-l-jkLog(env, env-l, JK_LOG_ERROR, -workerEnv.createWorker(): factory can't create worker %s:%s\n, + workerEnv.createWorker(): factory can't create worker %s:%s\n, type, name); return NULL; } +w=(jk_worker_t *)jkb-object; -w-pool=workerPool; w-workerEnv=wEnv; -w-rPoolCache= jk2_objCache_create( env, workerPool ); +w-rPoolCache= jk2_objCache_create( env, w-pool ); err=w-rPoolCache-init( env, w-rPoolCache, 1024 ); /* XXX make it unbound */ wEnv-worker_map-put(env, wEnv-worker_map, name, w, (void *)oldW); -if(oldW!=NULL) { -env-l-jkLog(env, env-l, JK_LOG_ERROR, -
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_status.c
costin 02/03/25 19:04:10 Modified:jk/native2/common jk_worker_status.c Log: Cleaner and more accurate display of configured and processed properties. Revision ChangesPath 1.12 +18 -10jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c Index: jk_worker_status.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- jk_worker_status.c24 Mar 2002 19:24:26 - 1.11 +++ jk_worker_status.c26 Mar 2002 03:04:10 - 1.12 @@ -163,22 +163,30 @@ char *name=env-_objects-nameAt( env, env-_objects, i ); jk_bean_t *mbean=env-_objects-valueAt( env, env-_objects, i ); int j; +int propCount; + +/* Don't display aliases */ +if( strchr(name, ':')==NULL ) +continue; if( mbean==NULL || mbean-settings==NULL ) continue; -s-jkprintf(env, s, trtd%s/td, mbean-name ); - -for( j=0; j mbean-settings-size( env, mbean-settings ); j++ ) { -char *pname=mbean-settings-nameAt( env, mbean-settings, j); -/* Don't save redundant information */ -if( strcmp( pname, name ) != NULL ) { -s-jkprintf( env, s, td%s/tdtd%s/td\n, - pname, - mbean-settings-valueAt( env, mbean-settings, j)); +propCount=mbean-settings-size( env, mbean-settings ); + +if( propCount==0 ) { +s-jkprintf(env, s, trtd%s/td/tr, mbean-name ); +} else { +for( j=0; j propCount ; j++ ) { +char *pname=mbean-settings-nameAt( env, mbean-settings, j); +/* Don't save redundant information */ +if( strcmp( pname, name ) != 0 ) { +s-jkprintf(env, s, trtd%s/tdtd%s/tdtd%s/td/tr, +name, pname, +mbean-settings-valueAt( env, mbean-settings, j)); +} } } -s-jkprintf( env,s , /tr\n ); } s-jkprintf( env,s , /table\n ); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_ajp13.c jk_worker_jni.c
costin 02/03/25 19:04:24 Modified:jk/native2/common jk_worker_ajp13.c jk_worker_jni.c Log: Update to the new interface changes, few fixes. Revision ChangesPath 1.5 +8 -4 jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c Index: jk_worker_ajp13.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- jk_worker_ajp13.c 25 Mar 2002 03:34:38 - 1.4 +++ jk_worker_ajp13.c 26 Mar 2002 03:04:24 - 1.5 @@ -480,6 +480,7 @@ { jk_endpoint_t *e = NULL; jk_pool_t *endpointPool; +jk_bean_t *jkb; if( ajp14-secret ==NULL ) { } @@ -496,9 +497,10 @@ } } -e = (jk_endpoint_t *)env-createInstance( env,ajp14-pool, endpoint, NULL ); -if( e==NULL ) +jkb=env-createBean2( env,ajp14-pool, endpoint, NULL ); +if( jkb==NULL ) return JK_FALSE; +e = (jk_endpoint_t *)jkb-object; e-worker = ajp14; *eP = e; @@ -581,7 +583,9 @@ } } -ajp14-channel= env-getByName( env, ajp14-channelName ); +if( ajp14-channel == NULL ) { +ajp14-channel= env-getByName( env, ajp14-channelName ); +} if( ajp14-channel == NULL ) { jk_bean_t * chB=env-createBean( env, ajp14-workerEnv-pool, ajp14-channelName); @@ -677,6 +681,6 @@ w-workerEnv=env-getByName( env, workerEnv ); w-workerEnv-addWorker( env, w-workerEnv, w ); - + return JK_TRUE; } 1.6 +11 -6 jakarta-tomcat-connectors/jk/native2/common/jk_worker_jni.c Index: jk_worker_jni.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_jni.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- jk_worker_jni.c 18 Mar 2002 18:45:25 - 1.5 +++ jk_worker_jni.c 26 Mar 2002 03:04:24 - 1.6 @@ -169,6 +169,7 @@ jint rc = 0; char *str_config = NULL; jk_map_t *props=_this-workerEnv-initData; +jk_bean_t *chB; if(! _this || ! _this-worker_private) { env-l-jkLog(env, env-l, JK_LOG_EMERG, @@ -291,20 +292,21 @@ stdout_name, stderr_name); -jniWorker-vm-detach(env, jniWorker-vm); +jniWorker-vm-detach(env, jniWorker-vm); + _this-workerEnv-vm= jniWorker-vm; /* We can have a single jni channel per instance, the name is hardcoded */ -_this-channel=env-createInstance(env, _this-pool,channel.jni, - channel.jni); +chB=env-createBean2(env, _this-pool,channel.jni, ); -if( _this-channel == NULL ) { +if( chB == NULL || chB-object==NULL ) { env-l-jkLog(env, env-l, JK_LOG_ERROR, Error creating jni channel\n); return JK_FALSE; } +_this-channel=chB-object; if(rc) { env-l-jkLog(env, env-l, JK_LOG_INFO, jni.init() Tomcat initialized OK, done\n); @@ -363,7 +365,8 @@ { jk_worker_t *_this; jni_worker_data_t *jniData; - +jk_bean_t *jkb; + if(name==NULL) { env-l-jkLog(env, env-l, JK_LOG_EMERG, jni.factory() NullPointerException name==null\n); @@ -388,7 +391,9 @@ _this-pool=pool; /* XXX split it in VM11 and VM12 util */ -jniData-vm=env-createInstance( env, pool, vm, vm ); +jkb=env-createBean2( env, pool, vm, ); +if( jkb==NULL ) return JK_FALSE; +jniData-vm=jkb-object; jniData-jk_java_bridge_class = NULL; jniData-jk_startup_method = NULL; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c mod_jk2.c
costin 02/03/25 19:04:54 Modified:jk/native2/server/apache13 mod_jk2.c jk/native2/server/apache2 jk_logger_apache2.c mod_jk2.c Log: Update to the interface changes, implement the vargs logging function in logger.apache2 Revision ChangesPath 1.8 +25 -11jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c Index: mod_jk2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_jk2.c 25 Mar 2002 03:31:41 - 1.7 +++ mod_jk2.c 26 Mar 2002 03:04:54 - 1.8 @@ -59,7 +59,7 @@ * Description: Apache 1.3 plugin for Jakarta/Tomcat * * Author: Gal Shachor [EMAIL PROTECTED] * * Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.7 $ * + * Version: $Revision: 1.8 $ * ***/ /* @@ -138,6 +138,7 @@ jk_env_t *env; jk_logger_t *l; jk_pool_t *globalPool; +jk_bean_t *jkb; /** First create a pool. We use the default ( jk ) pool impl, * other choices are apr or native. @@ -156,12 +157,16 @@ /* Create the logger . We use the default jk logger, will output to a file. Check the logger for default settings. */ -l = env-createInstance( env, env-globalPool, logger.file, logger); +jkb=env-createBean2( env, env-globalPool, logger.file, ); +l = jkb-object; env-l=l; +env-alias( env, logger.file:, logger); /* Create the workerEnv */ -workerEnv= env-createInstance( env, env-globalPool,workerEnv, workerEnv); +jkb=env-createBean2( env, env-globalPool,workerEnv, ); +workerEnv= jkb-object; +env-alias( env, workerEnv:, workerEnv); if( workerEnv==NULL || l== NULL ) { fprintf( stderr, Error initializing jk, NULL objects \n); @@ -195,6 +200,7 @@ static void *jk2_create_config(ap_pool *p, server_rec *s) { jk_uriEnv_t *newUri; +jk_bean_t *jkb; if( workerEnv==NULL ) { jk2_create_workerEnv(p, s ); @@ -207,9 +213,10 @@ fprintf( stderr, Create config for main host\n); } -newUri = workerEnv-globalEnv-createInstance( workerEnv-globalEnv, - workerEnv-pool, - uri, NULL ); +jkb=workerEnv-globalEnv-createBean2( workerEnv-globalEnv, + workerEnv-pool, + uri, NULL ); +newUri = jkb-object; newUri-workerEnv=workerEnv; return newUri; } @@ -257,6 +264,7 @@ env-l-jkLog(env, env-l, JK_LOG_INFO, mod_jk.post_config() init worker env\n); + workerEnv-init(env, workerEnv ); workerEnv-server_name = (char *)ap_get_server_version(); @@ -292,13 +300,14 @@ if(uriEnv==NULL || strcmp(r-handler,JK_HANDLER)!= 0 ) return DECLINED; -/* XXX Get an env instance */ -env = workerEnv-globalEnv; +/* Get an env instance */ +env = workerEnv-globalEnv-getEnv( workerEnv-globalEnv ); /* Set up r-read_chunked flags for chunked encoding, if present */ if(rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) { env-l-jkLog(env, env-l, JK_LOG_INFO, mod_jk.handler() Can't setup client block %d\n, rc); +workerEnv-globalEnv-releaseEnv( workerEnv-globalEnv, env ); return rc; } @@ -326,6 +335,7 @@ if(worker==NULL ) { env-l-jkLog(env, env-l, JK_LOG_ERROR, mod_jk.handle() No worker for %s\n, r-uri); +workerEnv-globalEnv-releaseEnv( workerEnv-globalEnv, env ); return 500; } @@ -369,11 +379,13 @@ } if(rc==JK_TRUE) { +workerEnv-globalEnv-releaseEnv( workerEnv-globalEnv, env ); return OK;/* NOT r-status, even if it has changed. */ } env-l-jkLog(env, env-l, JK_LOG_ERROR, mod_jk.handler() Error connecting to tomcat %d\n, rc); +workerEnv-globalEnv-releaseEnv( workerEnv-globalEnv, env ); return 500; } @@ -393,12 +405,13 @@ if( workerEnv-uriMap-size == 0 ) return DECLINED; -/* XXX get_env() */ -env=workerEnv-globalEnv; +/* get_env() */ +env = workerEnv-globalEnv-getEnv( workerEnv-globalEnv ); uriEnv = workerEnv-uriMap-mapUri(env,
Re: [PLAN] New Jasper
On Mon, 25 Mar 2002, Kin-Man Chung wrote: I have noticed that the current Jasper does a lot of string manipulations very slowly, e.g. there are unnecessary copying or concatenations, and the uses of String where StringBuffer should be used. Hopefully I can avoid all of these. But I don't have high hopes that Jasper performance can be improved to the point that an user will notice, because the time spent in Jasper is probably small compared with that spent in javac. Now if we could have jasper generate byte code directly... I wouldn't worry too much about this kind of optimizations - the page compilation happens only once and it's quite easy to pre-compile the pages with jspc. The place where optimizations do matter the most is the runtime - I would be happy with a generator/compiler that is slower but generates faster code. Even if it is possible to use BCEL to generate bytecodes directly, I think this would be a huge waste of time if done before the runtime is optimized. I'll try to see if I can help a bit with the runtime optimizations, now that the HTTP/1.1 stack is mostly done. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 5647] - AJP13 connector will not pass authentication requests
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5647. 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=5647 AJP13 connector will not pass authentication requests --- Additional Comments From [EMAIL PROTECTED] 2002-03-26 07:31 --- That, what I've said on 2002-03-04, is a bit wrong: the AJP connector DLL works correctly (I've looking at the wrong branch) - as Microsoft said in MSDN, when IIS is queried about REMOTE_USER, it returns empty string when user is anonymous (and in the correct connector branch, all variables are evaluated by querying IIS, not by examining request directly). So, there are two possible solutions: 1). Don't call setUserPrincipal(..) in AJP13Request.setAJPRequest OR 2). In FormAuthenticator, check not only for NULL in getUserPrincipal(), but also for empty String. The bug was corrected in CVS version 1.7 of AJP13Request.java only - solution 1 was applied, and then removed in version 1.8. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
jtc build dir
Now that there is a build dir for jtc I'd like to populate it with a bunch of rpm and linux binaries for mod_jk (mod_webapp still need some works) with/without eapi there is allready there a coyote dir /coyote/release/v1.0-b1/ /coyote/release/v1.0-b2/ /coyote/release/v1.0-b3/ /coyote/release/v1.0-b4/ what about also : /jk/release/v1.0-b1/ /jk/release/v1.0-b2/ where we could mimic the tc 3.3 tree : KEYS05-Mar-2002 04:42 5.9K bin/05-Mar-2002 04:42- rpms/ 05-Mar-2002 04:42- src/05-Mar-2002 04:42 bin : linux/ 05-Mar-2002 04:42- netware/05-Mar-2002 04:42- win32/ The idea will be to have regular snapshot from jtc and put there the source tarball and binaries : - mod_jk - native=jk 1.2 for Apache 1.3/2.0/IIS/iPlanet - native2=jk 2.0 for Apache 1.3/2.0 - java libs - jkant, tomcat-utils BTW, it should be nice to have also in coyote release a source tarball of jtc ;) It will help users find somewhere the up to date binaries for connectors, and remove that kind of stuff from tomcat 3.3/4.0 subdirs... Thanks to comment ;) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]