hgomez 2002/09/19 00:58:07 Modified: src/share/org/apache/tomcat/modules/config MxInterceptor.java Log: Add authentification method to MXInterceptor, need now to pass the user/password to HTTP adaptor Revision Changes Path 1.4 +25 -2 jakarta-tomcat/src/share/org/apache/tomcat/modules/config/MxInterceptor.java Index: MxInterceptor.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/MxInterceptor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- MxInterceptor.java 18 Sep 2002 07:57:09 -0000 1.3 +++ MxInterceptor.java 19 Sep 2002 07:58:07 -0000 1.4 @@ -76,6 +76,9 @@ MBeanServer mserver; private int port=-1; private String host; + private String auth; + private String user; + private String password; // -------------------- Tomcat callbacks -------------------- @@ -118,6 +121,23 @@ return host; } + public void setAuthentification( String auth ) { + if ("none".equals(auth) || "basic".equals(auth) || "digest".equals(auth)) + this.auth=auth; + } + + public String getAuthentification() { + return auth; + } + + public void setUser(String user) { + this.user = user; + } + + public void setPassword(String password) { + this.password = password; + } + /* ==================== Start/stop ==================== */ ObjectName serverName=null; @@ -133,7 +153,10 @@ mserver.setAttribute(serverName, new Attribute("Host", host)); mserver.setAttribute(serverName, new Attribute("Port", new Integer(port))); - + + if( auth!=null && user!=null && password!=null) + mserver.setAttribute(serverName, new Attribute("AuthenticationMethod", auth)); + ObjectName processorName = new ObjectName("Http:name=XSLTProcessor"); mserver.createMBean("mx4j.adaptor.http.XSLTProcessor", processorName, null); mserver.setAttribute(serverName, new Attribute("ProcessorName", processorName));
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>