Environment: WebSphere Network Deployment edition v6.1 (on Linux)
We have 2 applications "Main" and "Dynamic" that each run on a server cluster. Each of these applications is set to run from its unique domain name. So www.main.com/ is serviced by the Main application while www.dynamic.com/ is serviced by the Dynamic application.
The configurations required for this have been pretty simple. So no problem so far.
Dynamic application is related to Main and going forward, we want to be able to do the following:
We want to be able to serve the Dynamic application from: www.dynamic.com/ as well as www.main.com/d/
In order to achieve this, we have the following configuration specified in plugin-cfg.xml.
<URIGroup Name="MainURIs">
<URI Name="/*" />
</URIGroup>
<URIGroup Name="DynamicURIs">
<URI Name="/*" />
</URIGroup>
<URIGroup Name="Main_DynamicURIs">
<URI Name="/d/*" />
</URIGroup>
2 server clusters namely "MainCluster" and "DynamicCluster" have already been defined in plugin-cfg.xml. Similarly we have virtual host groups defined for www.main.com (virtual ho开发者_JAVA技巧st name) and www.dynamic.com as "MainVH" and "DynamicVH" respectively. We have the routing rules specified as follows:
<Route UriGroup="MainURIs" VirtualHostGroup="MainVH" ServerCluster="MainCluster"/>
<Route UriGroup="DynamicURIs" VirtualHostGroup="DynamicVH" ServerCluster="DynamicCluster"/>
<Route UriGroup="Main_DynamicURIs" ServerCluster="DynamicCluster"/>
Please note that we don't specify a virtual host group for the third route rule.
This seems to work fine for our purpose. However, we had to make the above change to plugin-cfg.xml by hand. Every time the plugin-cfg.xml file in regenerated, the changes are lost and we have to make them again. This is frowned upon by our clients and they don't want that to be the case going forward.
Is there a way we can overcome this problem of hand-editing the plugin-cfg.xml file?
Some vague ways I was thinking of:
1) Some how making this change using the admin console of WebSphere so that even if the xml file is regenerated, it would have the relevant routing rules automatically. 2) Writing a wsadmin JACL/Jython script that could be run each time after the plugin file is regenerated. This script should be able to update the above routing rules in the configuration. I have searched quite a lot for this approach but haven't found an encouraging reply to this approach.Any helpful tips are highly appreciated.
精彩评论