Not sure if I this will be a clear answer.
What is placed in the web.xml is based on the values specified in the build descriptor. For example, the sqlJNDIName is what supplies the value for the vgj.vgj.jdbc.default.database.<servicename> property in the web.xml.
So, your options:
- Use different build descriptors, one set for database 1 and one set for database 2. Then use the appropriate build descriptor for the service to set the right jndi connection info. You can set the default build descriptor at a file, package, or project level...so assuming the packages are different, you can set the correct one appropriately. (see note 1 below for more info)
- Manually set the web.xml after generation. You just have to be careful as subsequent generations will overwrite the changes. You can control the overwrite by using genProperties=NONE after you have them set the way you want.
On deployment, the values will not change unless you regenerate and somehow update it to the wrong values. Whatever is in the web.xml gets move along when you export/deploy the services.
Finally, remember that the values in the web.xml control the "implicit" connection. You can always override this by coding your own sqllib.connect within the code itself. (see NOTE 2)
Mark
NOTE 1: If you are concerned with having too many build descriptors to use, then look at using the "nextBuildDescriptor" build option. So for example, you can do the following:
MSSQLBuilddesc - sqlJNDIName=jdbc/XXXXXX, nextBuildDescriptor=commondescriptors
DB2Builddesc - sqlJNDINAME=jdbc/YYYYYY, nextBuildDescriptor=commondescriptors
Then the only unique item is the JNDI name. All other are set in the commonDescriptors.
NOTE 2: if you use Sqllib.connect, you could always set your own property in the web.xml, say something like "mydb". Then you can use the syslib.getProperty to read this property and use the value to populate the sqllib.connect values (or any other deployment value you want to use). .
markevans