On Mon, Jan 4, 2010 at 5:36 PM, Ivan <xhhsld@gmail.com> wrote:

2010/1/4 Forrest Xia <forrestxm@gmail.com>
I did a simple version change(change to 2.2:) to the app-per-port sample and make it packaged as a plugin, then try to install and start it in G 2.2.

It fails, I understand the failure on tomcat assembly is caused by the new server.xml support, but don't understand why it fails on Jetty assembly as well.

What I am trying is to update app-per-port sample to demo the new server.xml support feature(originated from http://old.nabble.com/Finishing-up-tomcat-server.xml-configuration-work...-ts24471974s134.html#a24471974).

My thought is to modify the server.xml directly to add an additional <Service> with different connectors and engine, so that the app-per-port samples can achieve the same result as before: war1 on a port, war2 on another port, both in the same server instance.

Unfortunately, it does not work on G 2.2 either. Cause TomcatServerGBean would throw IllegalStateException when more than one service defined in server.xml.

So far, my understanding to the server.xml support feature, which cannot do these things:
1. define multiple <Service>
2. define <context>
3. define jndi resources
4. define realms

 The item 2,3,4 are NOT supported, item 1 should be supported.

You can try to define two <Service> , and see what happens when starting the server. There will be an IllegalStateException thrown out. The code lays in TomcatServerGBean.java.

If multiple services are supposed to support, I will open a JIRA to track it. thanks!