MX4J and Axis

Terrence Irving <[email protected]>
Newsgroups gmane.comp.java.mx4j.user
Message-ID <[email protected]>
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();

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:

SOAPSECURESERVER1****> ConnectorServer.java code running
SOAPSECURESERVER1----> Context Init: MBeanie Application
SOAPSECURESERVER1----> javax.management.builder.initial initially: null
SOAPSECURESERVER1----> javax.management.builder.initial after setting it: mx4j.server.MX4JMBeanServerBuilder
SOAPSECURESERVER1----> Server Type: mx4j.server.MX4JMBeanServer
SOAPSECURESERVER1----> javax.management.builder.initial now: null
SOAPSECURESERVER1----> URL is: service:jmx:soap://WIRVITXP:8080/SOAP
SOAPSECURESERVER1****> Attempting to start SOAPConnectorServer
Exception while deploying AXIS service
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.SocketTimeoutException: Read timed out
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/}stackTrace: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:506)

.... and so on.

I was wondering if anyone might be able to offer some pointers as to why the .start() calls for both JMXConnectorServers and SOAPConnectorServers is leading to a socket timeout.  I haven't done much in the way of altering the deployment file, but so far I haven't recognized any indication that this is the root of the problem.  Thanks.

Terrence Irving


 		
---------------------------------
Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail Beta.

-------------------------------------------------------------------------
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

_______________________________________________
Mx4j-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mx4j-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.