Community
Participate
Working Groups
Build Identifier: 20100218-1602 I'm wondering how is eclipse bootstrapping catalina, please take a look at the steps. Reproducible: Always Steps to Reproduce: 1.created a server in WTP and pick "Use the custom location" option in the server configuration in eclipse 2.New configuration files are created in workspace/Server/server-name-config/ 3.Set up the server path and deploy path for my catalina base (not the internal .metadata one, but custom) 4.After I started it, the new default configuration files overwrote the original CATALINA_BASE/conf files I had there - I was glad, it should be like this (even though it should be the other way around at this starting point but I was glad because of the synchronization) 5. then if I change CATALINA_BASE/conf/server.xml and restart the server from eclipse, it is not synchronized anymore, CATALINA_BASE/conf/server.xml stays modified 6.also after I made changes in the eclipse config file workspace/Server/server-name-config/server.xml and restarted the server, the changes didn't appeared in the original file in CATALINA_BASE/conf/server.xml 7.So I set the CATALINA_BASE/conf/server.xml to fault configuration and restarted tomcat from eclipse and it worked ! it took the configuration from /Server/server-name-config/server.xml 8.Then I deleted CATALINA_BASE/conf/server.xml and it said that there is no server.xml in catalina base ! Is there some sort of caching or I don't understand. How is it possible ?
The source of the problem is that I failed to notice an important behavioral change in server publishing in 3.2.x. In prior versions of WTP, a publish operation would always publish the "server" portion of the operation, regardless of whether changes had or had not occurred in the server's configuration files, e.g. server.xml, tomcat-users.xml, etc. In WTP 3.2.x and later, nothing happens in a publish operation if the server isn't marked as "dirty". Since there had not been a need to mark the server "dirty" for configuration changes, there is no resource listener trying to detect changes to the Tomcat configuration files. As a result, publish operations won't publish configuration changes unless some other change has marked the server as "dirty". Implementing a resource listener to do this has to be done carefully so as not to impact performance too much. Thus, it might be too big a change for WTP 3.2.x. I'll have to see once I find time to implement this for WTP 3.3. In the mean time, as noted in Bug 320687, manually forcing a full publish operation by right-clicking on the Tomcat server in the Servers view and selecting "Clean..." should synchronize the configuration files whenever changes are made. *** This bug has been marked as a duplicate of bug 320687 ***