Re: ConnectorServer Start and Axis
"Simone Bordet" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 8/1/06, Terrence Irving <[email protected]> wrote: > I am working on a project that uses MX4J, Tomcat 5.5.17, and Axis 1.1. As > it is now, basically when Tomcat starts up, my MX4J MBean server code begins > running. My goal is to have the client connect to the server code using > SOAP, hence the need for Axis. For this project's purposes, deploying the > server code as a web service to Axis by using the command line is > unacceptable, so I have been considering alternatives (the same > project--server code and all--worked perfectly fine when used with RMI). > > The implementation that I'm trying to work with now is configuring the > web.xml file to specify the server code as a listener class (so that, > hypothetically, the server code will run when Tomcat starts up). The basic > order of operations of the server code is as follows: > > MBeanServer server = > MBeanServerFactory.newMBeanServer("serverName"); > Map environment = new HashMap(); > environment.put(HTTPConnectorServer.USE_EXTERNAL_WEB_CONTAINER, > Boolean.TRUE); > JMXServiceURL url = new JMXServiceURL("soap", null, PORT_NUMBER, "/SOAP"); > SOAPConnectorServer scs = new SOAPConnectorServer(url, environment, server); > scs.start(); Please use the JMXConnectorServerFactory here: your code will be more portable. > I have done this this way and also with a JMXConnectorServer in place of the > SOAPConnectorServer with the same result--when the "... .start()" line of > code is reached, a "SocketTimeoutException: Read timed" out is raised. > Thanks to my server code, Tomcat's console output is as follows: Please report: 1. Is Tomcat running on HTTPS or plain HTTP. Does it have both connectors listening ? 2. Is Tomcat really listening on port 8080 ? 3. Where are your web services deployed ? MX4J uses an Axis service called "AdminService" to deploy the JMX web service. Make sure that this service is properly deployed at this URL: http://WIRVITXP:8080/SOAP/AdminService If this is not the case, then you should either change the JMXServiceURL path or the Axis deployment. Simon -- http://bordet.blogspot.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV