[jboss-dev-forums] [Tomcat Integration Development] - Multiple Services in JBoss Web Server

Martin Hynar do-not-reply at jboss.com
Mon May 23 04:34:54 EDT 2011


Martin Hynar [http://community.jboss.org/people/martin.hynar] created the discussion

"Multiple Services in JBoss Web Server"

To view the discussion, visit: http://community.jboss.org/message/606507#606507

--------------------------------------------------------------
Hello,

In my current project there appeared problem with JBoss Web Server and multiple Service elements in it. I was reading this aged discussion  http://community.jboss.org/thread/90107?tstart=0 http://community.jboss.org/thread/90107?tstart=0 that made me feel that multiple services is supported concept. However, I used that and the result is that it is not working. It still might be that I configured something wrong but ...

So, I have server.xml with two service elements - each listening on different port (different Connector configuration) and each using different valves. I need this as I implemented some custom valves that provide me some logic before my application even gets chance to participate (in principle, it does validations and traffic shaping).

When I deploy server.xml (attached here) with two service, I get this:

08:07:08,291 INFO [Http11AprProtocol] Initializing Coyote HTTP/1.1 onhttp-localhost%2F127.0.0.1-8080
08:07:08,291 INFO [Http11AprProtocol] Initializing Coyote HTTP/1.1 onhttp-localhost%2F127.0.0.1-9090
08:07:08,322 INFO [StandardService] Starting service jboss.web
08:07:08,322 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.10
08:07:08,400 INFO [StandardService] Starting service jboss.web.custom
08:07:08,400 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.10
08:07:08,400 INFO [Catalina] Server startup in 107 ms
08:07:08,416 INFO [TomcatDeployment] deploy, ctxPath=/web-console
08:07:09,261 INFO [TomcatDeployment] deploy, ctxPath=/jbossws
08:07:09,292 INFO [TomcatDeployment] deploy, ctxPath=/invoker
 …
08:07:14,265INFO  [Http11AprProtocol] Starting CoyoteHTTP/1.1 on http-localhost%2F127.0.0.1-8080

Note that 2 Coyotes are initialized but finally only one is started. After that, you can access port 9090 but it hangs and no response is ever delivered. Also log is silent about doing anything.

Now, you can access on port 8080 JMX Console and find MBeans related to 9090 and manually start Coyote. Then log says:

08:13:06,106 INFO [Http11AprProtocol] Starting Coyote HTTP/1.1 onhttp-localhost%2F127.0.0.1-9090

Then accessing e.g.  http://localhost:9090/jmx-console http://localhost:9090/jmx-console (or whatever else deployed context name) gives you 404.

The server.xml attached here is an example configuration with 2 service elements. It uses only valves that are already available, not the ones, I use in my project. However, it still exhibits the "undesired" behavior.

Any help welcome here, thanks Martin
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/606507#606507]

Start a new discussion in Tomcat Integration Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2090]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110523/0469e0fa/attachment.html 


More information about the jboss-dev-forums mailing list