J2C query scripts
The scripting library provides many script procedures to manage your Java™ 2 Connector (J2C) configurations. This page provides usage information for scripts that query the J2C configuration. We can run each script individually or combine many procedures to create custom automation scripts for the environment.
Each J2C management script procedure is located in...
WAS_HOME/scriptLibraries/resources/J2C
The Jython script library provides script functions for J2C resources, JDBC providers, and JMS resources at the server scope. You can write the own custom scripts to configure resources at the cell, node, or cluster level.
Do not edit the script procedures in the script library. To write custom script library procedures, use the scripts in the WAS_HOME/scriptLibraries directory as Jython syntax samples. Save the custom scripts to a new subdirectory to avoid overwriting the library.
Use the following script procedures to query the J2C configurations:
- listAdminObjectInterfaces
- listConnectionFactoryInterfaces
- listJ2CActivationSpecs
- listJ2CAdminObjects
- listJ2CConnectionFactories
- listJ2CResourceAdapters
- listMessageListenerTypes
listAdminObjectInterfaces
This script displays a list of the admin object interfaces for the J2C resource adapter of interest. To run the script, specify the J2C resource adapter argument, as defined in the following table:
Table 1. listAdminObjectInterfaces script
Argument Description resourceAdapterID Configuration ID of the resource adapter of interest.
Syntax
AdminJ2C.listAdminObjectInterfaces(resourceAdapterID)Example usage
AdminJ2C.listAdminObjectInterfaces("J2CTest(cells/myCell/nodes/myNode|resources.xml#J2CResourceAdapter_1184091767578)")
listConnectionFactoryInterfaces
This script displays a list of the connection factory interfaces for the J2C resource adapter of interest. To run the script, specify the J2C resource adapter argument, as defined in the following table:
Table 2. listConnectioinFactoryInterfaces script
Argument Description resourceAdapterID Configuration ID of the resource adapter of interest.
Syntax
AdminJ2C.listConnectionFactoryInterfaces(resourceAdapterID)Example usage
AdminJ2C.listConnectionFactoryInterfaces("J2CTest(cells/myCell/nodes/myNode|resources.xml#J2CResourceAdapter_1184091767578)")
listJ2CActivationSpecs
This script displays a list of the J2C activation specifications in the J2C configuration. To run the script, specify the J2C resource adapter and message listener type arguments, as defined in the following table:
Table 3. listJ2CActivationSpecs script
Argument Description resourceAdapterID Configuration ID of the resource adapter of interest. messageListenerType Message listener type.
Syntax
AdminJ2C.listJ2CActivationSpecs(resourceAdapterID, messageListenerType)Example usage
AdminJ2C.listJ2CActivationSpecs("J2CTest(cells/myCell/nodes/myNode|resources.xml#J2CResourceAdapter_1184091767578)", "javax.jms.MessageListener2")
listJ2CAdminObjects
This script displays a list of the admin objects in the J2C configuration. To run the script, specify the application name and server name arguments, as defined in the following table:
Table 4. listJ2CAdminObjects script
Argument Description resourceAdapterID Name of the application of interest. adminObjectInterface Name of the admin object interface of interest.
Syntax
AdminJ2C.listJ2CAdminObjects(resourceAdapterID, adminObjectInterface)Example usage
AdminJ2C.listJ2CAdminObjects("J2CTest(cells/myCell/nodes/myNode|resources.xml#J2CResourceAdapter_1184091767578)", "fvt.adapter.message.FVTMessageProvider2")
listJ2CConnectionFactories
This script displays a list of the J2C connection factories in the J2C configuration. To run the script, specify the J2C resource adapter and connection factory interface arguments, as defined in the following table:
Table 5. listJ2CConnectionFactories script
Argument Description resourceAdapterID Configuration ID of the resource adapter of interest. connFactoryInterface Name of the connection factory interface of interest.
Syntax
AdminJ2C.listJ2CConnectionFactories(resourceAdapterID, connFactoryInterface)Example usage
AdminJ2C.listJ2CConnectionFactories("J2CTest(cells/myCell/nodes/myNode|resources.xml#J2CResourceAdapter_1184091767578)", "javax.sql.DataSource2")
listJ2CResourceAdapters
This script displays each J2C resource adapter in the configuration. To run the script, optionally specify the J2C resource adapter argument, as defined in the following table:
Table 6. listJ2CResourceAdapters script
Argument Description resourceAdapterName Name of the resource adapter to display.
Syntax
AdminJ2C.listJ2CResourceAdapters(resourceAdapterName)Example usage
AdminJ2C.listJ2CResourceAdapters()AdminJ2C.listJ2CResourceAdapters("myResourceAdapter")
listMessageListenerTypes
This script displays a list of the message listener types for the J2C resource adapter of interest. To run the script, specify the J2C resource adapter argument, as defined in the following table:
Table 7. listMessageListenerTypes script
Argument Description resourceAdapterID Configuration ID of the resource adapter of interest.
Syntax
AdminJ2C.listMessageListenerTypes(resourceAdapterID)Example usage
AdminJ2C.listMessageListenerTypes("J2CTest(cells/myCell/nodes/myNode|resources.xml#J2CResourceAdapter_1184091767578)")
Related tasks
Use the script library to automate the application serving environment
Related
J2C configuration scripts
JMS configuration scripts
JMS query scripts
JDBC configuration scripts
JDBC query scripts