开发者

How to override WebSphere "Enhanced EAR" configuration entries?

I am developing WebSphere 6.1 EAR app and I need to override configuration entries specified in META-INF/ibconfig directory. There reside extra configuration files, that describe various server objects - from JDBC to shared libraries and links. The problem is that these settings override those already defined at server.

Specifically, if I have an application already installed on server and Shared libraries and refs already created and install Enhanced EAR as update to that application, those from EAR will prevail and will purge previously created.

What I seek is some deployment options - for admin console or for wsadmin - th开发者_JS百科at will allow to ignore these configuration entries without actually deleting them from EAR file.

Best, and thank you in advance.


We use a python (actually jython) deploy script where all our configuration is set. Most of the configuration is read from files which are also used by maven in the process of creating the ear, and so minimizing the risk of typo's

AdminApp.install(earFile,['-MapResRefToEJB',createResRefMap(),'-MapModulesToServers', createModuleMap(), '-MapRolesToUsers', createRoleMap()])
setAppClassLoading()
AdminConfig.save()
AdminControl.invoke(appServer,'startApplication',appName)

Have a look in the documentation for all options.


There is a deployment option that can be used to ignore the application bindings in your updated EAR file, such that the existing configuration in your installed EAR takes precedence. When updating your application using wsadmin, the option is update.ignore.new. If updating your application using the admin console, this option is available by selecting the "use existing bindings" option from the "Preparing for the application update" step during the update.

This should accomplish what it seems that you are looking for. For example, consider that you have a resource reference in your application named "jdbc/MyDataSource" that is mapped to jdbc/ProductionDataSource in your installed application, and you are updating this application with a version of the EAR file that maps this resource reference to jdbc/TestDataSource in the IBM config files. Using the update.ignore.new option, this resource reference will continue to remain mapped to jdbc/ProductionDataSource after you have completed your application update. (Note that the default deployment behavior in WAS is that, without using this option, the resource reference would map to jdbc/TestDataSource in your updated application unless you explicitly overrode it otherwise during the deployment process.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜