webspherejythonwsadmin

Configuring settings for last paricipant support wsadmin/websphere


Recently i've came to an issue to configure Last Participant Support on deployed application. I've found some old post about that: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014090728 On server itself i found how to do it. But with jython or wsadmin commands im not able to find how to do it on application itself.

But it does not help for me. Any ideas?


Solution

  • There is no command assistance available for the action of changing last participant support from the admin console which typically implies there is no scripting command associated the action. And there doesn't appear to be an wsadmin AdminApp command to modify the property. Looking at config repo changes made as a result of the admin console action, the IBM Programming Model Extensions (PME) deployment descriptor file "ibm-application-ext-pme.xmi" for an application is created/modified by the action. If possible, the best long-term solution would be to use a tool like RAD to generate that extensions file when packaging the application because if you need to redeploy the app, your config changes wouldn't get overridden. If you can't mod the app, you can script the addition of an PME descriptor file in each of the desired apps with the knowledge that redeploying the app will overwrite your changes. The changes can be made by doing something along the lines of:
    1) create a text file named ibm-application-ext-pme.xmi with contents similar to this:

    <pmeext:PMEApplicationExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:pmeext="http://www.ibm.com/websphere/appserver/schemas/5.0/pmeext.xmi" xmi:id="PMEApplicationExtension_1559836881290">
          <lastParticipantSupportExtension xmi:id="LastParticipantSupportExtension_1559836881292" acceptHeuristicHazard="false"/>
    </pmeext:PMEApplicationExtension>
    

    2) in wsadmin or your jython script do the following (note in this example the xmi file you created is in the current directory, if not, include the full path to it in the createDocument command) :

    deployUri = "cells/<your_cell_name>/applications/<your_app_name>.ear/deployments/<your_app_name>/META-INF/ibm-application-ext-pme.xmi"
    AdminConfig.createDocument(deployUri, "ibm-application-ext-pme.xmi")
    AdminConfig.save()
    

    3) restart the server