Create and configuring a JDBC provider and data source using the JMX API
You need two JAR files in your classpath -- wsexception.jar and wasjmx.jar. The following command suffices for most invocations:
The usual program follows these main points:set classpath=%classpath%;D:\WebSphere\AppServer\lib\wsexception.jar;D:\WebSphere\AppServer\lib\wasjmx.jar
- Look up the host and get an administration client handle.
- Get a configuration service handle.
- Update the resource.xml file using the configuration service as desired.
- Add a JDBC provider
- Add the data source
- Add the connection factory (for CMP)
- Reload the resource.xml file to bind the newly created data source into the JNDI namespace. Perform this step if you want to use the newly created data source right away without restarting the appserver.
- Locate the DataSourceConfigHelper MBean using the name.
- Put together the signature and parameters for the call.
- Invoke the reload() call.
Connection factory
JDBC providers
Data sources
Using the JMX API to create a JDBC driver and data source for CMP
Using the JMX API to create a JDBC driver and data source for BMP, session beans, or servlets
Test a connection to a data source
Creating a JDBC provider and data source using JMX API and the scripting tool
Data Sources (Version 4)
Data Source collection
CMP Connection Factories collection
JDBC Provider collection
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.