[GUMP] Build Failure - jakarta-tomcat-5
This email is autogenerated from the output from: http://cvs.apache.org/builds/gump/2003-03-16/jakarta-tomcat-5.html Buildfile: build.xml prepare-release: [mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/release [mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/release/v5.0 [mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/release/v5.0/bin [mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/release/v5.0/src init: [mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/build [mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/build/classes [mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/build/server/lib [mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib deploy-static: [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib BUILD FAILED file:///home/rubys/jakarta/jakarta-tomcat-5/build.xml:139: Warning: Could not find file /opt/jmx-1_0_1-ri_bin/lib/mx4j-tools.jar to copy. Total time: 2 seconds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0 build.properties.sample
remm2003/03/16 02:41:00 Modified:.build.properties.sample Log: - Update dependencies. Revision ChangesPath 1.58 +19 -17jakarta-tomcat-4.0/build.properties.sample Index: build.properties.sample === RCS file: /home/cvs/jakarta-tomcat-4.0/build.properties.sample,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- build.properties.sample 12 Mar 2003 21:36:05 - 1.57 +++ build.properties.sample 16 Mar 2003 10:41:00 - 1.58 @@ -57,24 +57,31 @@ # - Commons Beanutils, version 1.1 or later - -commons-beanutils.home=${base.path}/commons-beanutils-1.4.1 +commons-beanutils.home=${base.path}/commons-beanutils-1.6.1 commons-beanutils.lib=${commons-beanutils.home} commons-beanutils.jar=${commons-beanutils.lib}/commons-beanutils.jar -commons-beanutils.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-beanutils/v1.4.1/commons-beanutils-1.4.1.tar.gz +commons-beanutils.loc=http://www.apache.org/dist/jakarta/commons/beanutils/binaries/commons-beanutils-1.6.1.tar.gz # - Commons Collections, version 1.0 or later - -commons-collections.home=${base.path}/commons-collections-2.0 +commons-collections.home=${base.path}/commons-collections-2.1 commons-collections.lib=${commons-collections.home} commons-collections.jar=${commons-collections.lib}/commons-collections.jar -commons-collections.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-collections/v2.0/commons-collections-2.0.tar.gz +commons-collections.loc=http://www.apache.org/dist/jakarta/commons/collections/binaries/collections-2.1.tar.gz # - Commons Digester, version 1.1.1 or later - -commons-digester.home=${base.path}/commons-digester-1.3 +commons-digester.home=${base.path}/commons-digester-1.4.1 commons-digester.lib=${commons-digester.home} commons-digester.jar=${commons-digester.lib}/commons-digester.jar -commons-digester.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-digester/v1.3/commons-digester-1.3.tar.gz +commons-digester.loc=http://www.apache.org/dist/jakarta/commons/digester/binaries/commons-digester-1.4.1.tar.gz + + +# - Commons FileUpload, nightly build - +commons-fileupload.home=${base.path}/commons-fileupload-1.0-beta-1 +commons-fileupload.lib=${commons-fileupload.home} +commons-fileupload.jar=${commons-fileupload.lib}/commons-fileupload-1.0-beta-1.jar +commons-fileupload.loc=http://www.apache.org/dist/jakarta/commons/fileupload/commons-fileupload-1.0-beta-1.tar.gz # - Commons Logging, version 1.0.1 or later - @@ -162,11 +169,6 @@ commons-pool.jar=${commons-pool.lib}/commons-pool.jar commons-pool.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-pool/v1.0.1/commons-pool-1.0.1.tar.gz -# - Commons FileUpload, nightly build - -commons-fileupload.home=${base.path}/commons-fileupload-1.0-beta-1 -commons-fileupload.lib=${commons-fileupload.home} -commons-fileupload.jar=${commons-fileupload.lib}/commons-fileupload-1.0-beta-1.jar -commons-fileupload.loc=http://www.apache.org/dist/jakarta/commons/fileupload/commons-fileupload-1.0-beta-1.tar.gz # - JavaService, version 1.2.0 or later - javaservice.home=${base.path}/javaservice @@ -179,11 +181,11 @@ jdbc20ext.jar=${jdbc20ext.lib}/jdbc2_0-stdext.jar -# - Java Management Extensions (JMX), JMX RI 1.0.1 or later or MX4J 1.1 or later - -jmx.home=${base.path}/mx4j-1.1 +# - Java Management Extensions (JMX), JMX RI 1.0.1 or later or MX4J 1.0 or later - +jmx.home=${base.path}/mx4j-1.1.1 jmx.lib=${jmx.home}/lib jmx.jar=${jmx.lib}/mx4j-jmx.jar -jmx.loc=http://telia.dl.sourceforge.net/sourceforge/mx4j/mx4j-1.1.tar.gz +jmx.loc=http://telia.dl.sourceforge.net/sourceforge/mx4j/mx4j-1.1.1.tar.gz # - Java Secure Sockets Extension (JSSE), version 1.0.2 or later - @@ -195,9 +197,9 @@ # - Java Transaction API (JTA), version 1.0.1 or later - -jta.home=${base.path}/jta-spec1_0_1 +jta.home=${base.path}/jta-1_0_1a jta.lib=${jta.home} -jta.jar=${jta.lib}/jta-spec1_0_1.jar +jta.jar=${jta.lib}/jta.jar # - JUnit Unit Test Suite, version 3.7 or later - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.1.txt
[EMAIL PROTECTED] wrote: remm2003/03/15 22:15:38 Modified:.RELEASE-NOTES-4.1.txt Log: - Status update. Revision ChangesPath 1.66 +7 -1 jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt Index: RELEASE-NOTES-4.1.txt === RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- RELEASE-NOTES-4.1.txt 14 Mar 2003 18:35:22 - 1.65 +++ RELEASE-NOTES-4.1.txt 16 Mar 2003 06:15:38 - 1.66 @@ -903,6 +903,12 @@ [4.1.21] Cookies: Fix to return values instead of the names. +[4.1.23] CoyoteAdapter: + Reject decoded URIs which don't start with '/'. + +[4.1.23] Cookies: + Add support for bad cookies. + Could you expand on what this means in the release notes? I know it would confuse me to read that release note without being familiar with the CVS commits. Glenn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 18040] New: - Entering error-page in web.xml for error code 401 BASIC unexpected behaviour
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=18040. 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=18040 Entering error-page in web.xml for error code 401 BASIC unexpected behaviour Summary: Entering error-page in web.xml for error code 401 BASIC unexpected behaviour Product: Tomcat 4 Version: 4.1.18 Platform: Macintosh OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] when trying to use a custom error page for my webapp with BASIC auth, i get no name/pass challenge, i'm fowarded straight to the 401 error page in my web.xml i have snippet error-page error-code401/error-code location/error/401.html/location /error-page snip/snip security-constraint web-resource-collection web-resource-nameMyApplication/web-resource-name url-pattern/admin/*/url-pattern url-pattern/servlet/com.myapp.admin.*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-namemyappadmin/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameMyApplication Realm/realm-name /login-config security-role role-namemyappadmin/role-name /security-role /snippet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bug report for Tomcat 3 [2003/03/16]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 258|Unc|Nor|2000-11-27|response.SendRedirect() resets/destroys Cookies th| | 2350|Ver|Nor|2001-06-27|ServletConfig.getInitParameter() requires url-patt| | 2478|Opn|Cri|2001-07-06|Passing Session variables between JSP's and Servle| | 4551|Opn|Nor|2001-10-31|Ctx( /tt01 ): IOException in: R( /tt01 + /com/abc/| | 4893|Unc|Blk|2001-11-15|Tomcat dies with following error..| | 4980|New|Min|2001-11-20|Startup message indicates incorrect log file | | 4994|New|Nor|2001-11-21|Tomcat needs a mechanism for clean and certain shu| | 5064|New|Cri|2001-11-25|Socket write error when include files is more than| | 5108|New|Maj|2001-11-26|Docs for Tomcat 3.2.x appear to be for Tomcat 3.3 | | 5137|New|Nor|2001-11-27|Null pointer in class loader after attempting to r| | 5160|Unc|Maj|2001-11-28|'IllegalStateException' | | 5331|New|Nor|2001-12-09|getPathInfo vs URL normalization | | 5510|New|Blk|2001-12-19|How to call ejb deployed in JBoss from Tomcat serv| | 5756|New|Nor|2002-01-08|jspc.bat exits with wrong ERRORLEVEL | | 5797|New|Nor|2002-01-10|UnCatched ? StringIndexOutOfBoundsException: Strin| | 6027|New|Maj|2002-01-25|Tomcat Automatically shuts down as service | | 6168|New|Blk|2002-02-01|IllegalStateException | | 6451|New|Cri|2002-02-14|Stackoverflow | | 6478|New|Enh|2002-02-14|Default Tomcat Encoding | | 6488|Ver|Maj|2002-02-15|Error: 304. Apparent bug in default ErrorHandler c| | 6648|New|Nor|2002-02-25|jakarta-servletapi build with java 1.4 javadoc err| | 6702|New|Cri|2002-02-27|win 2k services not working | | 6796|New|Cri|2002-03-01|Tomcat dies periodically | | 6989|New|Maj|2002-03-08|Unable to read tld file during parallel JSP compil| | 7008|Opn|Maj|2002-03-10|facade.HttpServletRequestFacade.getParameter(HttpS| | 7013|New|Cri|2002-03-10|Entering a servlet path with non-ISO8859-1 charact| | 7227|New|Nor|2002-03-19|error-code directive don't work | | 7236|New|Blk|2002-03-19|Permission denied to do thread.stop | | 7626|New|Nor|2002-03-29|classloader not working properly | | 7652|New|Cri|2002-04-01|Tomcat stalls periodically| | 7762|New|Enh|2002-04-05|stdout logfile handling | | 7785|New|Blk|2002-04-06|tomcat bug in context reloading | | 7789|New|Maj|2002-04-06|JSP Cookie Read/Write Fails With DNS Names| | 7863|New|Maj|2002-04-09|I have a problem when running Tomcat with IIS | | 8154|New|Nor|2002-04-16|logrotate script in RPM rotates non-existing file | | 8155|New|Nor|2002-04-16|Tomcat from RPM doesn't do logrotate | | 8187|New|Cri|2002-04-17|Errors when Tomcat used with MS Access database | | 8239|New|Cri|2002-04-18|Resource temporary unavailable| | 8263|New|Cri|2002-04-18|url-pattern easy to circumvent| | 8634|New|Nor|2002-04-30|no way to specify different modules.xml file | | 8992|New|Blk|2002-05-10|IE6/XP: Limitation of POST Area within HTTP reques| | 9086|New|Enh|2002-05-14|NPE org.apache.tomcat.core.ServerSession.setAttrib| | 9250|New|Maj|2002-05-20|outOfMemoryError | | 9362|New|Nor|2002-05-23|compiilation of JSP that includes a non-existant f| | 9367|New|Maj|2002-05-23|HttpSessionBindingEvent not thrown for HttpSession| | 9390|New|Nor|2002-05-24|jasper compilation error in tomcat| | 9480|New|Nor|2002-05-29|Data connection pooling | | 9607|New|Maj|2002-06-04|precompile JSP| | 9737|New|Nor|2002-06-10|ArrayIndexOutOfBoundsException when sending just p| |1|New|Cri|2002-06-19|IOException Broken Pipe when authenticating JDBCRe| |10039|New|Nor|2002-06-20|TimeStamp will not work correctly.|
Bug report for Tomcat 4 [2003/03/16]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 2820|Opn|Enh|2001-07-26|Implement GZIPOutput on HTTP 1.1 Connector| | 2885|Opn|Maj|2001-07-30|JspCompiler does not recompile changed JSP's | | 2902|Opn|Maj|2001-07-30|Duplicate Context path returned by getRealPath() | | 3509|Ass|Blk|2001-09-07|Apache 1.3.20 mod_webapp Tomcat 4b7 HANGS unde| | 3515|Opn|Enh|2001-09-10|Processes hanging after stopping Tomcat | | 3770|Opn|Maj|2001-09-21|HttpSessionListener.sessionCreated() called twice | | 3774|Opn|Nor|2001-09-21|Error loading web.xml on root context when specifi| | 3815|Opn|Min|2001-09-25|JspServlets produces NullPointerException | | 3888|Opn|Blk|2001-09-30|WebappClassLoader: Lifecycle error : CL stopped | | 4023|Opn|Min|2001-10-08|exceptions that terminate engine should be saved i| | 4042|Ass|Enh|2001-10-09|webapp component requires Port directive versus Li| | 4138|Opn|Nor|2001-10-12|Processor threads have inconsistent ClassLoader st| | 4212|Ass|Enh|2001-10-16|How to configure Apache to serve static contents? | | 4217|Opn|Nor|2001-10-16|Mis-named SetCharacterEncodingFilter.clas in distr| | 4236|Opn|Cri|2001-10-17|error in translation of tag attribute value, stri| | 4350|Ass|Nor|2001-10-22|SSLAuthenticator did not associate SSO session| | 4352|Ass|Nor|2001-10-22|JDBCRealm does not work with CLIENT-CERT auth-meth| | 4371|Unc|Nor|2001-10-23|No responses on browsing root when using WarpConne| | 4500|New|Nor|2001-10-29|isapi_redirect.dll does not pass Client certificat| | 4663|Opn|Maj|2001-11-05|Broken Pipe under some load | | 4829|Opn|Enh|2001-11-13|Automatic deployment of war files does not work pr| | 4930|Ass|Maj|2001-11-16|java.io.StreamCorruptedException: Type code out of| | 5143|New|Enh|2001-11-27|Please allow to specify the cipher set for HTTPS c| | 5199|Opn|Nor|2001-11-30|jsp:param in jsp:include section not correct | | 5229|New|Blk|2001-12-02|Session cannot unbind if using DistributedManager | | 5329|New|Nor|2001-12-08|NT Service exits startup before Tomcat is finished| | 5405|New|Enh|2001-12-13|Powered by Tomcat | | 5585|Opn|Nor|2001-12-24|Error page not displayed | | 5704|Ass|Maj|2002-01-05|CgiServlet corrupting images? | | 5709|Opn|Nor|2002-01-06|HttpServletRequest.getHost returns web server addr| | 5715|Opn|Nor|2002-01-07|response.setContentType() in Filter.doFilter not c| | 5759|Opn|Maj|2002-01-09|CGI servlet mapping by extension *.cgi does not wo| | 5762|Opn|Maj|2002-01-09|CGI servlet misses to include port number in HTTP_| | 5764|New|Enh|2002-01-09|Key Information Missing--Automatic Application Dep| | 5795|New|Enh|2002-01-10|Catalina Shutdown relies on localhost causing prob| | 5829|New|Enh|2002-01-13|StandardManager needs to cope with sessions throwi| | 5858|New|Enh|2002-01-15|Add tomcat dir to java.library.path | | 5952|Opn|Nor|2002-01-22|Refence to $JAVACMD in tomcat.conf incorrect in R| | 5985|New|Enh|2002-01-23|Tomcat should perform a more restrictive validatio| | 6036|Ass|Blk|2002-01-25|Problems with URI mapping | | 6048|Ass|Nor|2002-01-26|JDBC pool unavailable while using WARP connector | | 6049|New|Nor|2002-01-26|jsp-version should be 1.2 | | 6058|New|Enh|2002-01-27|Generated java files not in a correct package | | 6118|New|Enh|2002-01-30|Ambiguous error message for syntax errors | | 6194|Opn|Nor|2002-02-02|Unable to unpack wars without freezing? | | 6218|Opn|Nor|2002-02-04|Relative links broken for servlets| | 6228|Ass|Cri|2002-02-04|res.sendError sends blank page. | | 6229|New|Enh|2002-02-04|Need way to specify where to write catalina.out | | 6279|New|Nor|2002-02-06|Resubmit to j_security_check mistakenly fetches a | | 6399|New|Nor|2002-02-12|unknown protocol: https | | 6408|New|Enh|2002-02-12|Starting tomcat from a cygwin bash shell using 'st| |
DO NOT REPLY [Bug 17992] - Shutdown problems
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=17992. 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=17992 Shutdown problems [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2003-03-16 15:27 --- The JVM exist when all non-daemon threads have stopped running. You have code which is spawning a non-daemon thread and is not terminiating on shutdown so the JVM stays running. Double check to ensure your code is not doing this. When 4.1.23 comes out(soon) you can save the process id of the parent java process and use it to kill $TOMCAT_PID the JVM. So if this situation occurs - you can kill the JVM. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [5] Few major changes in JMX naming
Costin Manolache wrote: Not as major as the build breakage, I hope - but I think it is better to do it as soon as possible. Unless someone has good reasons not to do it, I'll start refactoring the JMX registration. There are few things I would like to do: - get rid of service=XXX in names. The JMX domain will correspond to one tomcat instance - there is no reason to make things more complex. The admin can just list all mbeans, search for *:type=Engine and get the domain. - The name of the Engine will be the same as the domain: foo:type=Engine will have a name attribute with value foo. I haven't looked at or played with the new JMX featuers. But I do have some thoughts on names and scopes. We need to ensure that there is a unique naming mechanism. A single monitoring tool may be used to monitor multiple instances of Tomcat. I plan on doing that some time in the future. Each instance of Tomcat running needs to have a unique name. The host name can not be used in lieu of the Engine name. I configure two Engine's which have the same host name. One for normal http, one for https. The scoping required to ensure unique names is /Service/Engine/Host/Context. - 2 major modes will be supported: JMX driven and API driven. In the first mode, tomcat will be controlled using JMX. Each component will use preRegister hook to learn it's name, and init() to register itself with the parent. For example, a Valve mbean with name: domain:type=Valve,host=myHost,name=valveName will know from the name that it must attach to host myHost in domain. The second mode tomcat will be created the old way, by using the internal APIs. The ServerLifecycleListener will be gradually removed - each component must be in control of its naming. There are 2 cases: - components that have lifecycle ( Container, Connector ) will check in init() if they already have a name. If not - they'll do the register themself. - all other components can be registered by the parent ( Valves, etc ). - the big mbeans-descriptors will be split up and each package will have an mbeans-descriptors describing its own components. Modeler can auto-discover it when registerComponent() is called, and that works for everything. I think this should be done now - or never. The main purpose is to have smarter and more flexible components, capable to support reloading, reconfiguration and work in any environment. Costin - 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: [5] Few major changes in JMX naming
Glenn Nielsen wrote: I haven't looked at or played with the new JMX featuers. But I do have some thoughts on names and scopes. We need to ensure that there is a unique naming mechanism. A single monitoring tool may be used to monitor multiple instances of Tomcat. I plan on doing that some time in the future. Each instance of Tomcat running needs to have a unique name. The host name can not be used in lieu of the Engine name. I configure two Engine's which have the same host name. One for normal http, one for https. The scoping required to ensure unique names is /Service/Engine/Host/Context. Did you understand that JMX domain name = engine name = unique ID ? Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 18044] New: - Session object recycling before all bound listeners has been notified.
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=18044. 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=18044 Session object recycling before all bound listeners has been notified. Summary: Session object recycling before all bound listeners has been notified. Product: Tomcat 3 Version: 3.1.1 Final Platform: Sun URL: www.flexstornet.com OS/Version: Solaris Status: NEW Severity: Critical Priority: Other Component: Servlet AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] We have found severe problems in our application due to data being crossed from one session to another. This was reported while an user was attempting to log out and another user was attempting to log in. We store user credentials and other application information in the session context and have a session manager class implementing the HttpSessionBindingListener interface also stored in the session context. When the session is invalidated during voluntary user log out or by session timeout, our session manager gets notified and takes care of some duties like logging a log out transaction to the database. We have found that when the access to the database take some time (which makes the processing in the valueUnbound method to take some time), a new user logging in will be assigned a new session id but apparently a recycled HttpSession object belonging to the user logging out and still containing attribute that have not been removed. We have been able to reproduce and verify this problem very easily, by bounding an object from a class that implements this code in the valueUnbound method: public void valueUnbound( HttpSessionBindingEvent event ) { // trace 1 System.out.println( Session Manager Thread sleeping for session + event.getSession().getId() ); try { Thread.sleep( 12 ); } catch ( InterruptedException ex ) {} // trace 2 System.out.println( Session Manager Thread resuming for session + event.getSession().getId() + ... ); } When the session is invalidated and this attribute object gets notified, it will print out the session id (trace 1) and sleep for 2 minutes. In the meantime, another session being requested which will be assigned a new session id but recycling the HttpSession object. When the thread wakes up, it will print the new session id (trace 2) which has been rewritten in the object. We have tested exactly the same testing code and our application in Tomcat 4.1.18 and everything works fine. Tomcat 3.3.1 final and 3.3.1a present the same problem. We think, that the recycling mechanism is invalidating the session, and adding the session object to some recycling pool before all the attributes(listeners) implementing the HttpSessionBindingListener interface has been notified not giving them a chance to finish the proper session cleaning. Any help with this problem will be greatly appreciated. Best Regards, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 18044] - Session object recycling before all bound listeners has been notified.
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=18044. 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=18044 Session object recycling before all bound listeners has been notified. [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2003-03-16 20:58 --- *** This bug has been marked as a duplicate of 15894 *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 15894] - Access to other sessions possible (session is immediately recycled after invalidation/expiration)
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=15894. 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=15894 Access to other sessions possible (session is immediately recycled after invalidation/expiration) [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2003-03-16 20:58 --- *** Bug 18044 has been marked as a duplicate of this bug. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.1.txt
remm2003/03/16 13:19:37 Modified:.RELEASE-NOTES-4.1.txt Log: no message Revision ChangesPath 1.67 +2 -2 jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt Index: RELEASE-NOTES-4.1.txt === RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- RELEASE-NOTES-4.1.txt 16 Mar 2003 06:15:38 - 1.66 +++ RELEASE-NOTES-4.1.txt 16 Mar 2003 21:19:37 - 1.67 @@ -907,7 +907,7 @@ Reject decoded URIs which don't start with '/'. [4.1.23] Cookies: - Add support for bad cookies. + Add handling for bad cookies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 12759] - Problem with HttpSession in load test
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=12759. 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=12759 Problem with HttpSession in load test [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2003-03-16 22:07 --- *** This bug has been marked as a duplicate of 15894 *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [5] Few major changes in JMX naming
Glenn Nielsen wrote: I haven't looked at or played with the new JMX featuers. But I do have some thoughts on names and scopes. We need to ensure that there is a unique naming mechanism. That's the intention of the change. A single monitoring tool may be used to monitor multiple instances of Tomcat. I plan on doing that some time in the future. Each instance of Tomcat running needs to have a unique name. Well - I'm already working on the JMX proxy ( similar with the proxy for mod_jk2 mbeans ). And /admin and any other tool will manage clusters ( or multiple instances ) just like they manage a single instance. For example, with a bit of cleanup, /admin could display a select box with all the domains - and administer any tomcat instance ( assuming some setup is done to proxy the JMX domains ) An essential piece is indeed the unique name - and in JMX terms that will be the domain ( and will also be used as jvmRoute ). The host name can not be used in lieu of the Engine name. I configure two Engine's which have the same host name. One for normal http, one for https. Host name has nothing to do with this. The JMX domain corresponds to one Engine. An Engine can contain multiple hosts, and you can have multiple engines ( in different JMX domains ) and multiple connectors. The Engine name is the id of a tomcat instance ( even if you run multiple Engines in the same JVM - from the point of view of routing or admin, they are different ) The scoping required to ensure unique names is /Service/Engine/Host/Context. There is a one-to-one mapping between Service and Engine, and Embeded tomcat doesn't use Service ( Service is just a wrapper for 1 Engine + Connectors ). So the naming will be: Engine - Host - Context Costin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [5] Few major changes in JMX naming
Thanks for clarifying that Costin. Just wanted to make sure. :-) Costin Manolache wrote: Glenn Nielsen wrote: I haven't looked at or played with the new JMX featuers. But I do have some thoughts on names and scopes. We need to ensure that there is a unique naming mechanism. That's the intention of the change. A single monitoring tool may be used to monitor multiple instances of Tomcat. I plan on doing that some time in the future. Each instance of Tomcat running needs to have a unique name. Well - I'm already working on the JMX proxy ( similar with the proxy for mod_jk2 mbeans ). And /admin and any other tool will manage clusters ( or multiple instances ) just like they manage a single instance. For example, with a bit of cleanup, /admin could display a select box with all the domains - and administer any tomcat instance ( assuming some setup is done to proxy the JMX domains ) An essential piece is indeed the unique name - and in JMX terms that will be the domain ( and will also be used as jvmRoute ). The host name can not be used in lieu of the Engine name. I configure two Engine's which have the same host name. One for normal http, one for https. Host name has nothing to do with this. The JMX domain corresponds to one Engine. An Engine can contain multiple hosts, and you can have multiple engines ( in different JMX domains ) and multiple connectors. The Engine name is the id of a tomcat instance ( even if you run multiple Engines in the same JVM - from the point of view of routing or admin, they are different ) The scoping required to ensure unique names is /Service/Engine/Host/Context. There is a one-to-one mapping between Service and Engine, and Embeded tomcat doesn't use Service ( Service is just a wrapper for 1 Engine + Connectors ). So the naming will be: Engine - Host - Context Costin - 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]
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse JSSE14Support.java JSSEImplementation.java JSSESupport.java
billbarker2003/03/16 20:04:08 Modified:util/java/org/apache/tomcat/util/net/jsse JSSEImplementation.java JSSESupport.java Added: util/java/org/apache/tomcat/util/net/jsse JSSE14Support.java Log: Having made the mistake of updating the build, I can't test this stuff anymore. Further re-factoring for JSSE 1.1.x. However, there is almost no functional difference from the old behavior with this commit. Just moving code around. Revision ChangesPath 1.5 +29 -2 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java Index: JSSEImplementation.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JSSEImplementation.java 15 Mar 2003 07:29:03 - 1.4 +++ JSSEImplementation.java 17 Mar 2003 04:04:07 - 1.5 @@ -65,6 +65,7 @@ import org.apache.tomcat.util.net.ServerSocketFactory; import java.io.*; import java.net.*; +import java.lang.reflect.Constructor; import javax.net.ssl.SSLSocket; /* JSSEImplementation: @@ -77,7 +78,13 @@ public class JSSEImplementation extends SSLImplementation { static final String JSSE14SocketFactory = -org.apache.tomcat.net.jsse.JSSE14SocketFactory; +org.apache.tomcat.util.net.jsse.JSSE14SocketFactory; +static final String JSSE14Support = +org.apache.tomcat.util.net.jsse.JSSE14Support; + +static org.apache.commons.logging.Log logger = +org.apache.commons.logging.LogFactory.getLog(JSSEImplementation.class); + public JSSEImplementation() throws ClassNotFoundException { // Check to see if JSSE is floating around somewhere Class.forName(javax.net.ssl.SSLServerSocketFactory); @@ -96,6 +103,8 @@ Class ssfCl = Class.forName(JSSE14SocketFactory); ssf =(ServerSocketFactory)ssfCl.newInstance(); } catch(Exception ex) { +if(logger.isDebugEnabled()) +logger.debug(Error finding + JSSE14SocketFactory, ex); ssf = new JSSESocketFactory(); } } else { @@ -106,7 +115,25 @@ public SSLSupport getSSLSupport(Socket s) { -return new JSSESupport((SSLSocket)s); +SSLSupport ssls = null; +if( JdkCompat.isJava14() ) { +try { +Class sslsCl = Class.forName(JSSE14Support); +Class [] cparams = new Class[1]; +cparams[0] = SSLSocket.class; +Constructor sslc = sslsCl.getConstructor(cparams); +Object [] params = new Object[1]; +params[0] = s; +ssls = (SSLSupport)sslc.newInstance(params); +} catch(Exception ex) { +if(logger.isDebugEnabled()) +logger.debug(Unable to get + JSSE14Support, ex); +ssls = new JSSESupport((SSLSocket)s); +} +} else { +ssls = new JSSESupport((SSLSocket)s); +} +return ssls; } 1.4 +23 -63 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Index: JSSESupport.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESupport.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- JSSESupport.java 9 Oct 2002 15:03:21 - 1.3 +++ JSSESupport.java 17 Mar 2003 04:04:07 - 1.4 @@ -66,8 +66,6 @@ import java.security.cert.CertificateFactory; import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSocket; -import javax.net.ssl.HandshakeCompletedListener; -import javax.net.ssl.HandshakeCompletedEvent; import java.security.cert.CertificateFactory; import javax.security.cert.X509Certificate; @@ -87,7 +85,7 @@ class JSSESupport implements SSLSupport { -private SSLSocket ssl; +protected SSLSocket ssl; JSSESupport(SSLSocket sock){ @@ -103,12 +101,12 @@ } public Object[] getPeerCertificateChain() - throws IOException { - return getPeerCertificateChain(false); +throws IOException { +return getPeerCertificateChain(false); } public Object[] getPeerCertificateChain(boolean force) - throws IOException { +throws IOException { // Look up the current SSLSession SSLSession session = ssl.getSession(); if (session == null) @@ -118,25 +116,21 @@ X509Certificate jsseCerts[] = null;
DO NOT REPLY [Bug 18054] New: - mod_webapp does not check whether servlet have been reloaded
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=18054. 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=18054 mod_webapp does not check whether servlet have been reloaded Summary: mod_webapp does not check whether servlet have been reloaded Product: Tomcat 4 Version: 4.0.2 Final Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: Other Component: Connector:Webapp AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi! I have the following problem. When I change my servlets and do reload action of my context in Manager i can see changes when I browse pages via Tomcat- standalone http server, but when I try to do this via Apache+mod_webapp, I can't see new servlet. I have to restart tomcat and apache to see changes in my servlet. What is the problem? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves mbeans-descriptors.xml
costin 2003/03/16 22:45:33 Added: catalina/src/share/org/apache/catalina/core mbeans-descriptors.xml catalina/src/share/org/apache/catalina/valves mbeans-descriptors.xml Log: Moved from mbeans. Modeler can pick them up automatically ( using the package name of the component ). I did a bit of reindentation - my emacs is not very friendly to the original style and I don't know how to set it to indent on the = :-) Revision ChangesPath 1.1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml Index: mbeans-descriptors.xml === ?xml version=1.0? mbeans-descriptors mbean name=DefaultContext description=Used to store the default configuration a Host will use when creating a Context domain=Catalina group=Default-Context type=org.apache.catalina.core.StandardDefaultContext attribute name=cookies description=Should we attempt to use cookies for session id communication? type=boolean/ attribute name=crossContext description=Should we allow the ServletContext.getContext() method to access the context of other web applications in this server? type=boolean/ attribute name=reloadable description=The reloadable flag for this web application type=boolean/ attribute name=swallowOutput description=Flag to set to cause the system.out and system.err to be redirected to the logger when executing a servlet type=boolean/ attribute name=useNaming description=Create JNDI naming context? is=true type=boolean/ attribute name=resourceNames description=Object names for the resources is=true type=[Ljava.lang.String;/ operation name=addEnvironment description=Add an environment entry for this web application impact=ACTION returnType=void parameter name=envName description=New environment entry name type=java.lang.String/ /operation operation name=addResource description=Add a resource reference for this web application impact=ACTION returnType=void parameter name=resourceName description=New resource reference name type=java.lang.String/ /operation operation name=removeEnvironment description=Remove any environment entry with the specified name impact=ACTION returnType=void parameter name=envName description=Name of the environment entry to remove type=java.lang.String/ /operation operation name=removeResource description=Remove any resource reference with the specified name impact=ACTION returnType=void parameter name=resourceName description=Name of the resource reference to remove type=java.lang.String/ /operation /mbean mbean name=NamingContextListener description=Helper class used to initialize and populate the JNDI context associated with each context and server domain=Catalina group=Listener type=org.apache.catalina.core.NamingContextListener attribute name=className description=Fully qualified class name of the managed object type=java.lang.String writeable=false/ attribute name=debug description=The debugging detail level for this component type=int/ /mbean mbean name=StandardContext description=Standard Context Component domain=Catalina group=Context type=org.apache.catalina.core.StandardContext attribute name=cookies description=Should we attempt to use cookies for session id communication? type=boolean/ attribute name=crossContext description=Should we allow the ServletContext.getContext() method to access the context of other web applications in this server? type=boolean/ attribute name=defaultWebXml description=Location of the default web.xml resource or file type=java.lang.String/ attribute name=privileged description=Access to tomcat internals
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ContainerBase.java
costin 2003/03/16 22:50:21 Modified:catalina/src/share/org/apache/catalina/core ContainerBase.java Log: Valves will now be registered when they are added, by Container. Since Valves don't implement Lifecycle, they have to be registered by the parent. They'll still be aware of their name. Revision ChangesPath 1.9 +34 -25 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java Index: ContainerBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ContainerBase.java12 Mar 2003 06:04:31 - 1.8 +++ ContainerBase.java17 Mar 2003 06:50:21 - 1.9 @@ -843,12 +843,12 @@ // XXX we should also send JMX notifications if( childCB.getObjectName() == null ) { // child was not registered yet. -ObjectName oname=childCB.createObjectName(this.getDomain(), -this.getObjectName()); -if( oname != null ) { -// XXX Register the child - -} +//ObjectName oname=childCB.createObjectName(this.getDomain(), +//this.getObjectName()); +//if( oname != null ) { +//// XXX Register the child +// +//} } } @@ -1334,15 +1334,16 @@ pipeline.addValve(valve); // If we are registered and the valve is not - create a default name -//if( domain != null valve instanceof ValveBase -//((ValveBase)valve).getObjectName()==null ) { -//try { -//ObjectName oname=((ValveBase)valve).createObjectName(domain, this.getObjectName()); -//Registry.getRegistry().registerComponent(valve, oname, valve.getClass().getName()); -//} catch( Throwable t ) { -//log.info( Can't register valve + valve , t ); -//} -//} +if( domain != null valve instanceof ValveBase +((ValveBase)valve).getObjectName()==null ) { +try { +ObjectName vname=((ValveBase)valve).createObjectName(domain, this.getObjectName()); +Registry.getRegistry().registerComponent(valve, vname, valve.getClass().getName()); +((ValveBase)valve).setController(oname); +} catch( Throwable t ) { +log.info( Can't register valve + valve , t ); +} +} fireContainerEvent(ADD_VALVE_EVENT, valve); } @@ -1378,14 +1379,20 @@ public synchronized void removeValve(Valve valve) { pipeline.removeValve(valve); -//if( domain != null valve instanceof ValveBase ) { -//try { -//ObjectName oname=((ValveBase)valve).getObjectName(); -//Registry.getRegistry().getMBeanServer().unregisterMBean(oname); -//} catch( Throwable t ) { -//log.info( Can't unregister valve + valve , t ); -//} -//} +if( domain != null +valve instanceof ValveBase ) { +try { +ValveBase vb=(ValveBase)valve; +if( vb.getController()!=null +vb.getController() == oname ) { + +ObjectName vname=vb.getObjectName(); +Registry.getRegistry().getMBeanServer().unregisterMBean(vname); +} +} catch( Throwable t ) { +log.info( Can't unregister valve + valve , t ); +} +} fireContainerEvent(REMOVE_VALVE_EVENT, valve); } @@ -1580,7 +1587,9 @@ return result; } -public ObjectName createObjectName(String domain, ObjectName parent) { +public ObjectName createObjectName(String domain, ObjectName parent) +throws Exception +{ if( log.isDebugEnabled()) log.debug(Create ObjectName + domain + + parent ); return null; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java
costin 2003/03/16 23:26:42 Modified:catalina/src/share/org/apache/catalina/core StandardContext.java Log: Remove service=, cleaner way to deal with the j2eeApplication and server - now they're also exposed as attributes, so a real j2ee server can set them when creating the context ( via JMX ) Revision ChangesPath 1.28 +32 -6 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java Index: StandardContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- StandardContext.java 14 Mar 2003 23:49:22 - 1.27 +++ StandardContext.java 17 Mar 2003 07:26:40 - 1.28 @@ -508,6 +508,9 @@ private long startupTime; private long tldScanTime; +private String j2EEApplication=none; +private String j2EEServer=none; + // - Context Properties public void setName( String name ) { @@ -885,6 +888,22 @@ } +public String getJ2EEApplication() { +return j2EEApplication; +} + +public void setJ2EEApplication(String j2EEApplication) { +this.j2EEApplication = j2EEApplication; +} + +public String getJ2EEServer() { +return j2EEServer; +} + +public void setJ2EEServer(String j2EEServer) { +this.j2EEServer = j2EEServer; +} + /** * Set the Loader with which this Context is associated. @@ -1647,7 +1666,11 @@ pattern = pattern.substring(pattern.lastIndexOf(*)); servletName = jsp; } -addServletMapping(pattern, servletName); +if( findChild(servletName) != null) { +addServletMapping(pattern, servletName); +} else { +log.info(Skiping + pattern + , no servlet + servletName); +} } @@ -4672,14 +4695,17 @@ String onameStr=null; try { if( oname==null || oname.getKeyProperty(j2eeType)==null ) { -ContainerBase ctx=(ContainerBase)parent; +StandardHost ctx=(StandardHost)parent; String pathName=getName(); String hostName=getParent().getName(); String name= // + ((hostName==null)? DEFAULT : hostName) + ((.equals(pathName))?/:pathName ); -onameStr=j2eeType=WebModule,name= + name + -ctx.getJSR77Suffix(); +String suffix=,J2EEApplication= + +getJ2EEApplication() + ,J2EEServer= + +getJ2EEServer(); + +onameStr=j2eeType=WebModule,name= + name + suffix; if( log.isDebugEnabled()) log.debug(Registering + onameStr + for + oname); @@ -4763,7 +4789,7 @@ } // XXX The service and domain should be the same. ObjectName parentName=new ObjectName( domain + : + -type=Host,host= + hostName + ,service=Tomcat-Standalone); +type=Host,host= + hostName); log.info(Adding to + parentName ); if( ! mserver.isRegistered(parentName)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardDefaultContext.java
costin 2003/03/16 23:28:51 Modified:catalina/src/share/org/apache/catalina/core StandardDefaultContext.java Log: - merged the code implementing JMX operations from mbeans ( it was almost the same, but with extra checks ) - started to add the jmx registration code - but I'm not sure how it should behave. For now it'll not be used. - optimize imports Revision ChangesPath 1.5 +286 -40 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java Index: StandardDefaultContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- StandardDefaultContext.java 8 Dec 2002 13:42:09 - 1.4 +++ StandardDefaultContext.java 17 Mar 2003 07:28:51 - 1.5 @@ -66,24 +66,23 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; -import java.util.Enumeration; +import java.net.URLDecoder; +import java.util.ArrayList; import java.util.HashMap; import java.util.Hashtable; -import java.util.Iterator; +import javax.management.MBeanRegistration; +import javax.management.MBeanServer; +import javax.management.MalformedObjectNameException; +import javax.management.ObjectName; import javax.naming.directory.DirContext; -import org.apache.naming.ContextAccessController; import org.apache.catalina.Container; -import org.apache.catalina.ContainerListener; import org.apache.catalina.Context; import org.apache.catalina.DefaultContext; -import org.apache.catalina.InstanceListener; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; -import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Loader; import org.apache.catalina.Manager; -import org.apache.catalina.Wrapper; import org.apache.catalina.deploy.ApplicationParameter; import org.apache.catalina.deploy.ContextEjb; import org.apache.catalina.deploy.ContextEnvironment; @@ -91,7 +90,11 @@ import org.apache.catalina.deploy.ContextResourceLink; import org.apache.catalina.deploy.NamingResources; import org.apache.catalina.deploy.ResourceParams; +import org.apache.catalina.mbeans.MBeanUtils; import org.apache.catalina.util.StringManager; +import org.apache.commons.modeler.ManagedBean; +import org.apache.commons.modeler.Registry; +import org.apache.naming.ContextAccessController; /** * Used to store the default configuration a Host will use @@ -104,7 +107,7 @@ */ public class StandardDefaultContext -implements DefaultContext, LifecycleListener { +implements DefaultContext, LifecycleListener, MBeanRegistration { // --- Constructors @@ -1059,18 +1062,6 @@ /** - * Remove any environment entry with the specified name. - * - * @param name Name of the environment entry to remove - */ -public void removeEnvironment(String name) { - -namingResources.removeEnvironment(name); - -} - - -/** * Remove a class name from the set of InstanceListener classes that * will be added to newly created Wrappers. * @@ -1130,45 +1121,82 @@ support.removePropertyChangeListener(listener); } - - + /** - * Remove any resource reference with the specified name. + * Remove any environment entry with the specified name. * - * @param name Name of the resource reference to remove + * @param name Name of the environment entry to remove */ -public void removeResource(String name) { - -namingResources.removeResource(name); +public void removeEnvironment(String envName) { +NamingResources nresources = getNamingResources(); +if (nresources == null) { +return; +} +ContextEnvironment env = nresources.findEnvironment(envName); +if (env == null) { +throw new IllegalArgumentException +(Invalid environment name ' + envName + '); +} +nresources.removeEnvironment(envName); } /** - * Remove any resource environment reference with the specified name. + * Remove any resource reference with the specified name. * - * @param name Name of the resource environment reference to remove + * @param resourceName Name of the resource reference to remove */ -public void removeResourceEnvRef(String name) { - -namingResources.removeResourceEnvRef(name); +public void
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardEngine.java
costin 2003/03/16 23:30:10 Modified:catalina/src/share/org/apache/catalina/core StandardEngine.java Log: If not registered yet - register ourself. That will replace the ServerLifecycleListener for standalone case - in embeded we are already registered by the JMX. Revision ChangesPath 1.5 +41 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java Index: StandardEngine.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- StandardEngine.java 7 Mar 2003 16:01:35 - 1.4 +++ StandardEngine.java 17 Mar 2003 07:30:09 - 1.5 @@ -80,6 +80,8 @@ import org.apache.catalina.Request; import org.apache.catalina.Response; import org.apache.catalina.Service; +import org.apache.catalina.Realm; +import org.apache.catalina.realm.JAASRealm; import org.apache.catalina.util.ServerInfo; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -168,6 +170,19 @@ // - Properties +/** Provide a default in case no explicit configuration is set + * + * @return configured realm, or a JAAS realm by default + */ +public Realm getRealm() { +Realm configured=super.getRealm(); +if( configured==null ) { +configured=new JAASRealm(); +this.setRealm( configured ); +} +return configured; +} + /** * Return the default host. @@ -363,6 +378,19 @@ * @exception LifecycleException if a startup error occurs */ public void start() throws LifecycleException { +if( started ) { +return; +} +if( oname==null ) { +// not registered in JMX yet - standalone mode +try { +domain=getName(); +log.info( Register + domain ); +oname=new ObjectName(domain + :type=Engine); +} catch( Throwable t ) { +log.info(Error registering , t ); +} +} // Log our server identification information //System.out.println(ServerInfo.getServerInfo()); @@ -426,4 +454,13 @@ return name; } + +public ObjectName createObjectName(String domain, ObjectName parent) +throws Exception +{ +if( log.isDebugEnabled()) +log.debug(Create ObjectName + domain + + parent ); +return new ObjectName( domain + :type=Engine); +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHost.java
costin 2003/03/16 23:32:53 Modified:catalina/src/share/org/apache/catalina/core StandardHost.java Log: Forgot to mention in the last commit: if no realm is set explicitely, JAAS will be created automatically. I'll make it default to the name of the engine - so the jaas application id will also match the engine name, jmx domain, jvmroute, etc. ( unless explicitely configured otherwise ) In Host - same register itself if not done already. Name no longer includes service. In embeded case - when the object is created, it'll register itself with the engine ( using the same domain name and the well-known name of the engine ) Revision ChangesPath 1.5 +29 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java Index: StandardHost.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- StandardHost.java 12 Mar 2003 06:28:55 - 1.4 +++ StandardHost.java 17 Mar 2003 07:32:53 - 1.5 @@ -756,7 +756,21 @@ * that prevents it from being started */ public synchronized void start() throws LifecycleException { - +if( started ) { +return; +} +if( oname==null ) { +// not registered in JMX yet - standalone mode +try { +StandardEngine engine=(StandardEngine)parent; +domain=engine.getName(); +log.info( Register + domain ); +oname=new ObjectName(domain + :type=Host,host= + +this.getName()); +} catch( Throwable t ) { +log.info(Error registering , t ); +} +} // Set error report valve if ((errorReportValveClass != null) (!errorReportValveClass.equals())) { @@ -1018,10 +1032,12 @@ } public void init() throws Exception { +// already registered. if( getParent() != null ) return; -ObjectName serviceName=new ObjectName(domain + -:type=Engine,name=Tomcat-Standalone); +// Register with the Engine +ObjectName serviceName=new ObjectName(domain + :type=Engine); + if( mserver.isRegistered( serviceName )) { log.info(Registering with the Engine); try { @@ -1033,4 +1049,13 @@ } } } + +public ObjectName createObjectName(String domain, ObjectName parent) +throws Exception +{ +if( log.isDebugEnabled()) +log.debug(Create ObjectName + domain + + parent ); +return new ObjectName( domain + :type=Host,name= + getName()); +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardWrapper.java
costin 2003/03/16 23:36:59 Modified:catalina/src/share/org/apache/catalina/core StandardWrapper.java Log: update the registration code Revision ChangesPath 1.18 +55 -53 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapper.java Index: StandardWrapper.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- StandardWrapper.java 14 Mar 2003 22:07:33 - 1.17 +++ StandardWrapper.java 17 Mar 2003 07:36:59 - 1.18 @@ -268,11 +268,11 @@ /** * Return the available date/time for this servlet, in milliseconds since - * the epoch. If this date/time is Long.MAX_VALUE, it is considered to mean - * that unavailability is permanent and any request for this servlet will return - * an SC_NOT_FOUND error. If this date/time is in the future, any request for - * this servlet will return an SC_SERVICE_UNAVAILABLE error. If it is zero, - * the servlet is currently available. + * the epoch. If this date/time is Long.MAX_VALUE, it is considered to mean + * that unavailability is permanent and any request for this servlet will return + * an SC_NOT_FOUND error. If this date/time is in the future, any request for + * this servlet will return an SC_SERVICE_UNAVAILABLE error. If it is zero, + * the servlet is currently available. */ public long getAvailable() { @@ -283,9 +283,9 @@ /** * Set the available date/time for this servlet, in milliseconds since the - * epoch. If this date/time is Long.MAX_VALUE, it is considered to mean - * that unavailability is permanent and any request for this servlet will return - * an SC_NOT_FOUND error. If this date/time is in the future, any request for + * epoch. If this date/time is Long.MAX_VALUE, it is considered to mean + * that unavailability is permanent and any request for this servlet will return + * an SC_NOT_FOUND error. If this date/time is in the future, any request for * this servlet will return an SC_SERVICE_UNAVAILABLE error. * * @param available The new available date/time @@ -462,7 +462,7 @@ int oldMaxInstances = this.maxInstances; this.maxInstances = maxInstances; -support.firePropertyChange(maxInstances, oldMaxInstances, +support.firePropertyChange(maxInstances, oldMaxInstances, this.maxInstances); } @@ -631,7 +631,7 @@ /** * Add a mapping associated with the Wrapper. - * + * * @param pattern The new wrapper mapping */ public void addMapping(String mapping) { @@ -903,14 +903,14 @@ if (jspWrapper != null) actualClass = jspWrapper.getServletClass(); } - + // Complain if no servlet class has been specified if (actualClass == null) { unavailable(null); throw new ServletException (sm.getString(standardWrapper.notClass, getName())); } - + // Acquire an instance of the class loader to be used Loader loader = getLoader(); if (loader == null) { @@ -918,14 +918,14 @@ throw new ServletException (sm.getString(standardWrapper.missingLoader, getName())); } - + ClassLoader classLoader = loader.getClassLoader(); - + // Special case class loader for a container provided servlet if (isContainerProvidedServlet(actualClass)) { classLoader = this.getClass().getClassLoader(); } - + // Load the specified servlet class from the appropriate class loader Class classClass = null; try { @@ -934,7 +934,7 @@ final String factualClass = actualClass; try{ classClass = (Class)AccessController.doPrivileged( -new PrivilegedExceptionAction(){ +new PrivilegedExceptionAction(){ public Object run() throws Exception{ if (fclassLoader != null) { return fclassLoader.loadClass(factualClass); @@ -942,17 +942,17 @@ return Class.forName(factualClass);
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappLoader.java
costin 2003/03/16 23:37:32 Modified:catalina/src/share/org/apache/catalina/loader WebappLoader.java Log: Add registration code Revision ChangesPath 1.10 +79 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java Index: WebappLoader.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- WebappLoader.java 12 Mar 2003 06:33:37 - 1.9 +++ WebappLoader.java 17 Mar 2003 07:37:32 - 1.10 @@ -86,6 +86,10 @@ import javax.naming.NameClassPair; import javax.naming.NamingEnumeration; import javax.naming.directory.DirContext; +import javax.management.MBeanRegistration; +import javax.management.ObjectName; +import javax.management.MBeanServer; +import javax.management.MalformedObjectNameException; import org.apache.naming.resources.Resource; import org.apache.naming.resources.DirContextURLStreamHandler; import org.apache.naming.resources.DirContextURLStreamHandlerFactory; @@ -99,10 +103,13 @@ import org.apache.catalina.LifecycleListener; import org.apache.catalina.Loader; import org.apache.catalina.Logger; +import org.apache.catalina.core.ContainerBase; +import org.apache.catalina.core.StandardContext; import org.apache.catalina.util.LifecycleSupport; import org.apache.catalina.util.StringManager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.commons.modeler.Registry; /** @@ -124,7 +131,7 @@ */ public class WebappLoader -implements Lifecycle, Loader, PropertyChangeListener, Runnable { +implements Lifecycle, Loader, PropertyChangeListener, Runnable, MBeanRegistration { // --- Constructors @@ -664,6 +671,41 @@ } +private boolean initialized=false; + +public void init() { +initialized=true; + +if( oname==null ) { +// not registered yet - standalone or API +if( container instanceof StandardContext) { +// Register ourself. The container must be a webapp +try { +StandardContext ctx=(StandardContext)container; +oname=new ObjectName(ctx.getDomain() + :type=Loader,path= + +ctx.getPath() + ,host= + ctx.getParent().getName()); +Registry.getRegistry().registerComponent(this, oname, null); +controller=oname; +} catch (Exception e) { +log.error(Error registering loader, e ); +} +} +} + +if( container == null ) { +// JMX created the loader +// TODO + +} +} + +public void destroy() { +if( controller==oname ) { +// Self-registration, undo it +Registry.getRegistry().unregisterComponent(oname); +} + +} /** * Start this component, initializing our associated class loader. @@ -672,6 +714,7 @@ */ public void start() throws LifecycleException { // Validate and update our current component state +if( ! initialized ) init(); if (started) throw new LifecycleException (sm.getString(webappLoader.alreadyStarted)); @@ -769,6 +812,8 @@ DirContextURLStreamHandler.unbind((ClassLoader) classLoader); classLoader = null; +destroy(); + } @@ -1419,4 +1464,36 @@ private static org.apache.commons.logging.Log log= org.apache.commons.logging.LogFactory.getLog( WebappLoader.class ); + +private ObjectName oname; +private MBeanServer mserver; +private String domain; +private ObjectName controller; + +public ObjectName preRegister(MBeanServer server, + ObjectName name) throws Exception { +oname=name; +mserver=server; +domain=name.getDomain(); + +return name; +} + +public void postRegister(Boolean registrationDone) { +} + +public void preDeregister() throws Exception { +} + +public void postDeregister() { +} + +public ObjectName getController() { +return controller; +} + +public void setController(ObjectName controller) { +this.controller = controller; +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java
costin 2003/03/16 23:39:13 Modified:catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java Log: Update the names - no service. Use the cleaner Registry API, load the descriptors for each package. This will be optional - but for now it's needed since a lot of code in this package is using the last part of the name. Revision ChangesPath 1.12 +42 -92 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java Index: MBeanUtils.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- MBeanUtils.java 8 Mar 2003 06:59:46 - 1.11 +++ MBeanUtils.java 17 Mar 2003 07:39:13 - 1.12 @@ -886,7 +886,6 @@ if (service != null) serviceName = service.getName(); name = new ObjectName(domain + :type=Connector + - ,service= + serviceName + ,port= + port + ,address= + address); return (name); @@ -923,8 +922,7 @@ path = /; name = new ObjectName(domain + :type=Context,path= + path + ,host= + - host.getName() + ,service= + - service.getName()); + host.getName()); return (name); } @@ -959,7 +957,6 @@ name = new ObjectName(domain + :type=Environment + ,resourcetype=Context,path= + path + ,host= + host.getName() + -,service= + service.getName() + ,name= + environment.getName()); } else if (container instanceof DefaultContext) { container = ((DefaultContext)container).getParent(); @@ -968,14 +965,12 @@ Service service = ((Engine)host.getParent()).getService(); name = new ObjectName(domain + :type=Environment + ,resourcetype=HostDefaultContext,host= + host.getName() + -,service= + service.getName() + ,name= + environment.getName()); } else if (container instanceof Engine) { Engine engine = (Engine) container; Service service = engine.getService(); name = new ObjectName(domain + :type=Environment + -,resourcetype=ServiceDefaultContext,service= + -service.getName() + ,name= + environment.getName()); +,resourcetype=ServiceDefaultContext,name= + environment.getName()); } } @@ -1015,8 +1010,7 @@ name = new ObjectName(domain + :type=Resource + ,resourcetype=Context,path= + path + ,host= + host.getName() + -,service= + service.getName() + -,class= + resource.getType() + +,class= + resource.getType() + ,name= + encodedResourceName); } else if (container instanceof DefaultContext) { container = ((DefaultContext)container).getParent(); @@ -1025,15 +1019,13 @@ Service service = ((Engine)host.getParent()).getService(); name = new ObjectName(domain + :type=Resource + ,resourcetype=HostDefaultContext,host= + host.getName() + -,service= + service.getName() + -,class= + resource.getType() + +,class= + resource.getType() + ,name= + encodedResourceName); } else if (container instanceof Engine) { Engine engine = (Engine) container; Service service = engine.getService(); name = new ObjectName(domain + :type=Resource + -,resourcetype=ServiceDefaultContext,service= + service.getName() + -,class= + resource.getType() + +,resourcetype=ServiceDefaultContext,class= + resource.getType() + ,name= + encodedResourceName); } } @@ -1074,7 +1066,6 @@ name = new ObjectName(domain + :type=ResourceLink + ,resourcetype=Context,path= + path + ,host= + host.getName() + -,service= + service.getName() +
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans ServerLifecycleListener.java
costin 2003/03/16 23:40:49 Modified:catalina/src/share/org/apache/catalina/mbeans ServerLifecycleListener.java Log: Stop registering the components that can register themself. This is part of the refactoring. Note that admin will be broken until the process is completed - most likely next weekend. Revision ChangesPath 1.8 +28 -144 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java Index: ServerLifecycleListener.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ServerLifecycleListener.java 12 Mar 2003 06:41:09 - 1.7 +++ ServerLifecycleListener.java 17 Mar 2003 07:40:49 - 1.8 @@ -88,7 +88,6 @@ import org.apache.catalina.Server; import org.apache.catalina.ServerFactory; import org.apache.catalina.Service; -import org.apache.catalina.Valve; import org.apache.catalina.core.StandardContext; import org.apache.catalina.core.StandardEngine; import org.apache.catalina.core.StandardHost; @@ -180,15 +179,9 @@ if (Container.ADD_CHILD_EVENT.equals(type)) { processContainerAddChild(event.getContainer(), (Container) event.getData()); -} else if (Container.ADD_VALVE_EVENT.equals(type)) { -processContainerAddValve(event.getContainer(), - (Valve) event.getData()); } else if (Container.REMOVE_CHILD_EVENT.equals(type)) { processContainerRemoveChild(event.getContainer(), (Container) event.getData()); -} else if (Container.REMOVE_VALVE_EVENT.equals(type)) { -processContainerRemoveValve(event.getContainer(), -(Valve) event.getData()); } } catch (Exception e) { log.error(Exception processing event + event, e); @@ -418,9 +411,9 @@ protected void createMBeans(Connector connector) throws Exception { // Create the MBean for the Connnector itself -if (log.isDebugEnabled()) -log.debug(Creating MBean for Connector + connector); -MBeanUtils.createMBean(connector); +//if (log.isDebugEnabled()) +//log.debug(Creating MBean for Connector + connector); +//MBeanUtils.createMBean(connector); } @@ -437,7 +430,7 @@ // Create the MBean for the Context itself if (log.isDebugEnabled()) log.debug(Creating MBean for Context + context); -MBeanUtils.createMBean(context); +//MBeanUtils.createMBean(context); context.addContainerListener(this); if (context instanceof StandardContext) { ((StandardContext) context).addPropertyChangeListener(this); @@ -460,7 +453,7 @@ if (cLoader != null) { if (log.isDebugEnabled()) log.debug(Creating MBean for Loader + cLoader); -MBeanUtils.createMBean(cLoader); +//MBeanUtils.createMBean(cLoader); } Logger hLogger = context.getParent().getLogger(); Logger cLogger = context.getLogger(); @@ -483,17 +476,6 @@ MBeanUtils.createMBean(cRealm); } -// Create the MBeans for the associated Valves -if (context instanceof StandardContext) { -Valve cValves[] = ((StandardContext)context).getValves(); -for (int l = 0; l cValves.length; l++) { -if (log.isDebugEnabled()) -log.debug(Creating MBean for Valve + cValves[l]); -MBeanUtils.createMBean(cValves[l]); -} - -} - // Create the MBeans for the NamingResources (if any) NamingResources resources = context.getNamingResources(); createMBeans(resources); @@ -579,7 +561,7 @@ if (dLoader != null) { if (log.isDebugEnabled()) log.debug(Creating MBean for Loader + dLoader); -MBeanUtils.createMBean(dLoader); +//MBeanUtils.createMBean(dLoader); } Manager dManager = dcontext.getManager(); @@ -609,7 +591,7 @@ if (log.isDebugEnabled()) { log.debug(Creating MBean for Engine + engine); } -MBeanUtils.createMBean(engine); +//MBeanUtils.createMBean(engine); engine.addContainerListener(this); if (engine instanceof StandardEngine) { ((StandardEngine)
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml
costin 2003/03/16 23:41:08 Modified:catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml Log: Remove the part that moved to the packages. Revision ChangesPath 1.20 +37 -916 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- mbeans-descriptors.xml12 Mar 2003 21:15:23 - 1.19 +++ mbeans-descriptors.xml17 Mar 2003 07:41:08 - 1.20 @@ -1,49 +1,6 @@ ?xml version=1.0? mbeans-descriptors - mbean name=AccessLogValve - description=Valve that generates a web server access log - domain=Catalina -group=Valve - type=org.apache.catalina.valves.AccessLogValve - -attribute name=className - description=Fully qualified class name of the managed object - type=java.lang.String -writeable=false/ - -attribute name=debug - description=The debugging detail level for this component - type=int/ - -attribute name=directory - description=The directory in which log files are created - type=java.lang.String/ - -attribute name=pattern - description=The pattern used to format our access log lines - type=java.lang.String/ - -attribute name=prefix - description=The prefix that is added to log file filenames - type=java.lang.String/ - -attribute name=resolveHosts - description=Resolve hosts - is=true - type=boolean/ - -attribute name=rotatable - description=Rotate log - is=true - type=boolean/ - -attribute name=suffix - description=The suffix that is added to log file filenames - type=java.lang.String/ - - /mbean - mbean name=BasicAuthenticator description=An Authenticator and Valve implementation of HTTP BASIC @@ -79,23 +36,6 @@ /mbean - mbean name=CertificatesValve - description=Valve that exposes SSL certificate information - domain=Catalina -group=Valve - type=org.apache.catalina.valves.CertificatesValve - -attribute name=className - description=Fully qualified class name of the managed object - type=java.lang.String -writeable=false/ - -attribute name=debug - description=The debugging detail level for this component - type=int/ - - /mbean - mbean name=ContextConfig description=Startup event listener for a Context that configures the @@ -205,187 +145,7 @@ /mbean - mbean name=CoyoteConnector -className=org.apache.catalina.mbeans.ConnectorMBean - description=Implementation of a Coyote connector - domain=Catalina -group=Connector - type=org.apache.coyote.tomcat5.CoyoteConnector - -attribute name=acceptCount - description=The accept count for this Connector - type=int/ - -attribute name=address - description=The IP address on which to bind - type=java.lang.String/ - -attribute name=bufferSize - description=The input buffer size we should create on input streams - type=int/ - -attribute name=className - description=Fully qualified class name of the managed object - type=java.lang.String -writeable=false/ - -attribute name=clientAuth - description=Should we require client authentication? - type=boolean/ - -attribute name=connectionTimeout - description=Timeout value on the incoming connection - type=int/ - -attribute name=curProcessors - description=Current number of active processors - type=int -writeable=false/ - -attribute name=debug - description=The debugging detail level for this component - type=int/ - -attribute name=enableLookups - description=The 'enable DNS lookups' flag for this Connector - type=boolean/ - -attribute name=keystoreFile - description=Pathname to the key store file to be
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves ValveBase.java
costin 2003/03/16 23:43:49 Modified:catalina/src/share/org/apache/catalina/valves ValveBase.java Log: Registration magic Revision ChangesPath 1.4 +26 -13 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ValveBase.java Index: ValveBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ValveBase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ValveBase.java8 Mar 2003 07:02:56 - 1.3 +++ ValveBase.java17 Mar 2003 07:43:49 - 1.4 @@ -85,6 +85,8 @@ import org.apache.catalina.Context; import org.apache.catalina.core.ContainerBase; import org.apache.catalina.util.StringManager; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; /** @@ -100,7 +102,7 @@ public abstract class ValveBase implements Contained, Valve, MBeanRegistration { - +private static Log log = LogFactory.getLog(ValveBase.class); //-- Instance Variables @@ -214,6 +216,7 @@ protected String domain; protected ObjectName oname; protected MBeanServer mserver; +protected ObjectName controller; public ObjectName getObjectName() { return oname; @@ -242,6 +245,14 @@ public void postDeregister() { } +public ObjectName getController() { +return controller; +} + +public void setController(ObjectName controller) { +this.controller = controller; +} + /** From the name, extract the parent object name * * @param valveName @@ -265,22 +276,18 @@ /* Compute the parent name part */ String parentName=; if (container instanceof Engine) { -Service service = ((Engine)container).getService(); -parentName=,service= + service.getName(); } else if (container instanceof Host) { -Service service = ((Engine)container.getParent()).getService(); -parentName=,host= +container.getName() + ,service= + -service.getName(); +parentName=,host= +container.getName(); } else if (container instanceof Context) { String path = ((Context)container).getPath(); if (path.length() 1) { path = /; } Host host = (Host) container.getParent(); -Service service = ((Engine) host.getParent()).getService(); parentName=,path= + path + ,host= + -host.getName() + ,service= + service.getName(); +host.getName(); } +log.info(valve parent= + parentName + + parent); String className=this.getClass().getName(); int period = className.lastIndexOf('.'); @@ -293,6 +300,7 @@ if( valves[i]!=null valves[i].getClass() == this.getClass() valves[i] != this ) { +log.info(Duplicate + valves[i] + + this + + container); seq++; } } @@ -301,8 +309,13 @@ ext=,seq= + seq; } -return new ObjectName( domain + :type=Valve,name= + className + ext); +return new ObjectName( domain + :type=Valve,name= + className + ext + parentName); } +// JMX data +public ObjectName getContainerName() { +if( container== null) return null; +return ((ContainerBase)container).getObjectName(); +} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5 CoyoteConnector.java
costin 2003/03/16 23:46:01 Modified:coyote/src/java/org/apache/coyote/tomcat5 CoyoteConnector.java Log: Registration magic Revision ChangesPath 1.21 +74 -9 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteConnector.java Index: CoyoteConnector.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteConnector.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- CoyoteConnector.java 13 Mar 2003 10:04:21 - 1.20 +++ CoyoteConnector.java 17 Mar 2003 07:46:01 - 1.21 @@ -61,10 +61,12 @@ package org.apache.coyote.tomcat5; import java.util.Vector; +import java.lang.reflect.Method; import javax.management.ObjectName; import javax.management.MBeanServer; import javax.management.MBeanRegistration; +import javax.management.MalformedObjectNameException; import org.apache.commons.modeler.Registry; import org.apache.commons.logging.Log; @@ -85,6 +87,9 @@ import org.apache.catalina.Request; import org.apache.catalina.Response; import org.apache.catalina.Service; +import org.apache.catalina.Engine; +import org.apache.catalina.core.ContainerBase; +import org.apache.catalina.core.StandardEngine; import org.apache.catalina.net.DefaultServerSocketFactory; import org.apache.catalina.net.ServerSocketFactory; import org.apache.catalina.util.LifecycleSupport; @@ -867,7 +872,7 @@ } /** - * Return the flag to see if we do a redirect to directories that don't + * Return the flag to see if we do a redirect to directories that don't * end in a '/'. */ public boolean getRedirectDirectories() { @@ -1087,6 +1092,21 @@ this.initialized = true; +if( oname == null (container instanceof StandardEngine)) { +try { +// we are loaded directly, via API - and no name was given to us +StandardEngine cb=(StandardEngine)container; +String addSuffix=(getAddress()==null) ?: ,address= + getAddress(); +oname=new ObjectName(cb.getName() + :type=Connector,port=+ +getPort() + addSuffix); +Registry.getRegistry().registerComponent(this, oname, null); +controller=oname; +} catch (Exception e) { +log.error( Error registering connector , e); +} +log.info(Creating name for connector + oname); +} + // Initializa adapter adapter = new CoyoteAdapter(this); @@ -1291,10 +1311,48 @@ coyoteFactory.setKeystoreFile(keystoreFile); } +/** + * Return keystorePass + * + * @exception Exception if an MBean cannot be created or registered + */ +public String getKeystorePass() +throws Exception +{ +ServerSocketFactory factory = getFactory(); +if( factory instanceof CoyoteServerSocketFactory ) { +return ((CoyoteServerSocketFactory)factory).getKeystorePass(); +} +return null; +} + + +/** + * Set keystorePass + * + * @exception Exception if an MBean cannot be created or registered + */ +public void setKeystorePass(String keystorePass) +throws Exception +{ +ServerSocketFactory factory = getFactory(); +if( factory instanceof CoyoteServerSocketFactory ) { +((CoyoteServerSocketFactory)factory).setKeystorePass(keystorePass); +} +} // JMX registration protected String domain; protected ObjectName oname; protected MBeanServer mserver; +ObjectName controller; + +public ObjectName getController() { +return controller; +} + +public void setController(ObjectName controller) { +this.controller = controller; +} public ObjectName getObjectName() { return oname; @@ -1337,7 +1395,7 @@ if( container==null ) { // Register to the service ObjectName parentName=new ObjectName( domain + : + -type=Service,name=Tomcat-Standalone); +type=Service); log.info(Adding to + parentName ); if( mserver.isRegistered(parentName )) { @@ -1345,15 +1403,17 @@ new String[] {org.apache.catalina.Connector}); // As a side effect we'll get the container field set // Also initialize will be called -return; +//return; } // XXX Go
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5 MapperListener.java
costin 2003/03/16 23:46:24 Modified:coyote/src/java/org/apache/coyote/tomcat5 MapperListener.java Log: Remove service from the name Revision ChangesPath 1.8 +1 -1 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/MapperListener.java Index: MapperListener.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/MapperListener.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- MapperListener.java 8 Mar 2003 06:52:36 - 1.7 +++ MapperListener.java 17 Mar 2003 07:46:24 - 1.8 @@ -237,7 +237,7 @@ container=server.findServices()[0].getContainer(); } else { String domain=Catalina; -ObjectName engineName=new ObjectName(domain + :type=Engine,name=Tomcat-Standalone); +ObjectName engineName=new ObjectName(domain + :type=Engine); container=(Container)mBeanServer.getAttribute(engineName, managedResource); } Container[] hosts = null; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve ValveUtil.java
costin 2003/03/16 23:50:13 Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationLocales.java ApplicationServlet.java Lists.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service EditServiceAction.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve ValveUtil.java Log: A number of quick replaces and fixes. It'll be much better after I finish moving all components to the new domain - now some names are broken. Revision ChangesPath 1.2 +16 -11 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationLocales.java Index: ApplicationLocales.java === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationLocales.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ApplicationLocales.java 18 Jul 2002 16:48:20 - 1.1 +++ ApplicationLocales.java 17 Mar 2003 07:50:12 - 1.2 @@ -102,14 +102,19 @@ return; for (int i = 0; i list.length; i++) { -ResourceBundle bundle = -ResourceBundle.getBundle(config, list[i]); -if (bundle == null) +try { +ResourceBundle bundle = +ResourceBundle.getBundle(config, list[i]); +if (bundle == null) +continue; +if (list[i].equals(bundle.getLocale())) { +localeLabels.add(list[i].getDisplayName()); +localeValues.add(list[i].toString()); +supportedLocales.add(list[i]); +} +} catch( Exception ex ) { +servlet.log(Missing locale + list[i] ); continue; -if (list[i].equals(bundle.getLocale())) { -localeLabels.add(list[i].getDisplayName()); -localeValues.add(list[i].toString()); -supportedLocales.add(list[i]); } } 1.3 +10 -8 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationServlet.java Index: ApplicationServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ApplicationServlet.java 20 Nov 2002 00:12:58 - 1.2 +++ ApplicationServlet.java 17 Mar 2003 07:50:12 - 1.3 @@ -188,8 +188,9 @@ */ protected void initRegistry() throws ServletException { -registry = (Registry) getServletContext().getAttribute -(org.apache.catalina.Registry); +registry = Registry.getRegistry(); +//(Registry) getServletContext().getAttribute +//(org.apache.catalina.Registry); if (registry == null) throw new UnavailableException(Registry is not available); @@ -206,8 +207,9 @@ */ protected void initServer() throws ServletException { -server = (MBeanServer) getServletContext().getAttribute -(org.apache.catalina.MBeanServer); +server = Registry.getRegistry().getMBeanServer(); +//(MBeanServer) getServletContext().getAttribute +//(org.apache.catalina.MBeanServer); if (server == null) throw new UnavailableException(MBeanServer is not available); 1.4 +6 -28 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/Lists.java Index: Lists.java === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/Lists.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Lists.java3 Feb 2003 23:16:52 - 1.3 +++ Lists.java17 Mar 2003 07:50:12 - 1.4 @@ -184,9 +184,7 @@ throws Exception { StringBuffer sb = new StringBuffer(service.getDomain()); -sb.append(:type=Connector,service=); -sb.append(service.getKeyProperty(name)); -sb.append(,*); +sb.append(:type=Connector,*); ObjectName search = new ObjectName(sb.toString()); ArrayList connectors = new ArrayList(); Iterator names = mbserver.queryNames(search, null).iterator(); @@ -231,8 +229,6 @@ StringBuffer sb = new StringBuffer(host.getDomain()); sb.append(:type=Context,host=);
/admin
The admin app is now mostly broken - I did a small try to get it running, but it'll take more work. Amy - I would appreciate your help :-) There are still several components that need to be changed - the biggest problem at the moment is that some components are using the Engine name and some are using the default from mbeans-descriptors. Costin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]