Configure enterprise bean modules using wsadmin.sh
Using Jacl
set deployments [$AdminConfig getid /Deployment:myApp/] set deploymentObject [$AdminConfig showAttribute $deployments deployedObject] set modules [$AdminConfig showAttribute $deploymentObject modules] foreach module $modules \ { \ if ([regexp EJBModuleDeployment $module] == 1) \ { \ $AdminConfig create EJBModuleConfiguration $module \ { \ {name myejbModuleConfig} \ {description "EJB Module Config post created"} \ { \ enterpriseBeanConfigs:StatefulSessionBeanConfig \ { \ { \ {ejbName myejb} \ {timeout 10000} \ } \ } \ } \ } \ } \ } $AdminConfig save
Using Jython
deployments = AdminConfig.getid('/Deployment:myApp/') print deployments deploymentObject = AdminConfig.showAttribute(deployments, 'deployedObject') print modules = AdminConfig.showAttribute(deploymentObject, 'modules') arrayModules = modules[1:len(modules)-1].split(" ") for module in arrayModules... if module.find('EJBModuleDeployment') != -1... AdminConfig.create('EJBModuleConfiguration', module, [['name', 'myejbModuleConfig'], ['description', "EJB Module Config post created"], ['enterpriseBeanConfigs:StatefulSessionBeanConfig', [[['ejbName', 'myejb'], ['timeout', 10000]]]]]) AdminConfig.save()