mx4j/src/etc index.jsp,1.3,1.4

Simone Bordet <[email protected]> Sun, 31 Oct 2004 11:36:34 +0000
Newsgroups gmane.comp.java.mx4j.cvs
Message-ID <[email protected]>
Update of /cvsroot/mx4j/mx4j/src/etc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19837/src/etc

Modified Files:
	index.jsp 
Log Message:
Updated the JSP to reflect the changes of SOAP connector

Index: index.jsp
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/etc/index.jsp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** index.jsp	4 Sep 2004 15:44:13 -0000	1.3
--- index.jsp	31 Oct 2004 11:36:31 -0000	1.4
***************
*** 10,13 ****
--- 10,16 ----
  Purpose of this JSP is to provide an example of how to start a SOAPConnectorServer
  from within a running servlet container.
+ The assumption is that Axis has already been deployed in the servlet container by
+ defining and mapping Axis' servlets in web.xml (see the sample web.xml bundled with
+ this WAR for details).
  --%>
  <%@ page import="java.util.*" %>
***************
*** 16,26 ****
  <%@ page import="mx4j.tools.remote.soap.*" %>
  <%
!    // The URLPath of this JMXServiceURL must match with the one in web.xml
!    String path = "/services/jmxconnector";
!    JMXServiceURL address = new JMXServiceURL("soap", "localhost", request.getServerPort(), path);
  
     Map environment = new HashMap();
     environment.put(SOAPConnectorServer.USE_EXTERNAL_WEB_CONTAINER, Boolean.TRUE);
-    environment.put(SOAPConnectorServer.AXIS_DEPLOY_URL, request.getContextPath() + path);
  
     JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(address, environment, null);
--- 19,31 ----
  <%@ page import="mx4j.tools.remote.soap.*" %>
  <%
!    // The URLPath of this JMXServiceURL must match with the one in web.xml:
!    // Axis is mapped to /services/* and the 'jmxconnector' is the name of the
!    // remote MBeanServer web service.
!    String path = request.getContextPath() + "/services/jmxconnector";
!    JMXServiceURL address = new JMXServiceURL("soap", null, request.getServerPort(), path);
  
     Map environment = new HashMap();
+    // Don't start a new web container, since it's already started
     environment.put(SOAPConnectorServer.USE_EXTERNAL_WEB_CONTAINER, Boolean.TRUE);
  
     JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(address, environment, null);



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click