Override session management via deployment descriptor
We have a WebSphere Application Server 6.1. Session management is configured with replication and timeout etc... (the obvious).
An new project needs some other settings for session management (longer timeout, no replication necessary). There is a check box in the WebSphere Admin Console:
Enterprise Application > appname > Session management > Override Session management
Then the settings in the deployment descriptor are the valid ones. Only proplem is, that is not checked by default and there is no option during deployment to give that information to WebSphere. So our scripted deployment fails to check that and a h开发者_Go百科uman has to do it.
Is there another way to do this? Maybe via something in the deployment descriptor?
OK, took me sometime but here is the solution in Jython:
deployedApplication = AdminConfig.getid('/Deployment:<appname>/')
deployedObject = AdminConfig.showAttribute(deployedApplication, 'deployedObject')
sessionMgrAttrs = [['sessionManagement', [['enable', 'true']]]]
AdminConfig.create('ApplicationConfig', deployedObject, sessionMgrAttrs)
AdminConfig.save()
That checks the check box I mentioned via a script (Don't forget to sync to the nodes after that).
Anything you can do through the console can be scripted using wsadmin. So I think you'll neeed to have your script install the the app and then do some additional steps in wsadmin.
Info Centre starting point
Have you looked at Websphere Installation Factory ? You can create customized installation packages where you can add the product and all the fixes and create a bundle out of it so it will be one straight install. While creating these packages you can add pre-install and post-install scripts. I believe you can change the settings by running a script after the install. Try that and let us know if that works.
Here is a link to the page which talks about customizing the install.
Installation Factory
精彩评论