These examples demonstrate how to manage the WebSphere Business Integration Adapters (WBIA) using the wsadmin scripting environment. To use this environment, you must first locate the instance of the MBean, which is named WBIAAdminMBean. This bean has one operation, executeCommand, which takes the following arguments:
The following examples describe how to identify the MBean, locate and select configured WBIA resource factories, show and set attributes and variables, and invoke WBIA commands:
set wbiambean [$AdminConfig queryNames *:*,type=WBIAAdminMBean]Example output:
wbiambean:platform=common,cell=mycell,version=5.02,name=WBIAAdminMBean,mbeanIdentifier=WBIAAdminMBean,type=WBIAAdminMBean,node=mynode,process=server1
$AdminConfig list WebSphereBusinessIntegrationAdapterFactoryExample output: (shows two configured)
MyAdapter1(cells/mycell/nodes/mynode:resources-pme502.xml#WebSphereBusinessIntegrationAdapterFactory_1055014328949) MyAdapter2(cells/mycell/nodes/mynode:resources-pme502.xml#WebSphereBusinessIntegrationAdapterFactory_1055008720284)
set MyAdapter1 MyAdapter1(cells/mycell/nodes/mynode:resources-pme502.xml#WebSphereBusinessIntegrationAdapterFactory_1055014328949)Example output:
MyAdapter1(cells/mycell/nodes/mynode:resources-pme502.xml#WebSphereBusinessIntegrationAdapterFactory_1055014328949)
$AdminConfig show $MyAdapter1Example output:
{adminInQueueJNDIName jms/AdminInQueue} {adminOutQueueJNDIName jms/AdminOutQueue} {jndiName wbia/MyAdapter1_1055008683211} {messageTimeout 30} {name MyAdapter1} {provider WebSphereBusinessIntegrationAdapterProvider(cells/mycell/nodes/mynode:resources-pme502.xml#WebSphereBusinessIntegrationAdapterProvider_1055008720284)} {queueConnectionFactoryJNDIName jms/MyAdapter1QCF}
set MyAdapter1JNDIName [list "wbia/MyAdapter1_1055008683211"]Example output:
wbia/MyAdapter1_1055008683211
set command [list "status"]Example output:
status
set MyAdapter1status [list $MyAdapter1JNDIName $command]Example output:
wbia/MyAdapter1_1055008683211 status
$AdminControl invoke $wbiambean executeCommand $MyAdapter1statusExample output if the MyAdapter1 connector is active:
WBIA0017I: The status command has been acknowledged as being received by the MYAdapter1 adapter. The status is active.
Use the same format to invoke all the WBIA commands: