views:

245

answers:

3

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 human has to do it.

Is there another way to do this? Maybe via something in the deployment descriptor?

+1  A: 

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

djna
that's what I thought to... it would be more elegant though to do it during install itself or through a descriptor...
dertoni
A: 

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

Sridhar Adusumilli
No, never heard of it. I will look into it, but as we have a deployment solution utilizing ant and some custom jython scripts, that would be a rather big change...
dertoni
A: 

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).

dertoni