com.ibm.di.api.jmx.mbeans
Interface ConfigInstanceMBean

All Superinterfaces:
BaseAdminMBean, BaseMBean
All Known Implementing Classes:
ConfigInstance

public interface ConfigInstanceMBean
extends BaseAdminMBean

ConfigInstance MBean interface that defines public methods exposed through JMX layer.


Method Summary
 String getALLastLogFileName(String aALName)
          Returns the name of the log file created on the last run of a given AssemblyLine.
 String getALLog(String aALName, String aLogFileName)
          Given an AssemblyLine name, and a log file name, retrieves the log of this AssemblyLine, stored in the specified file.
 String[] getALLogFileNames(String aALName)
          Returns the names of all available log files for a given AssemblyLine.
 String getALLogLastChunk(String aALName, String aLogFileName, Integer aKilobytes)
          Retrieves the last chunk from a specified AssemblyLine's log file.
 SchemaConfig getAssemblyLineInputParameters(String aAssemblyLineName)
          Returns the AssemblyLine’s input parameters.
 String[] getAssemblyLineNames()
          Returns the AssemblyLines’ names.
 SchemaConfig getAssemblyLineOutputParameters(String aAssemblyLineName)
          Returns the AssemblyLine’s output parameters.
 ObjectName[] getAssemblyLines()
          Returns the names of currently started AssemblyLines of the configuration each represented as ObjectName generated from AssemblyLine’s name and unique code.
 String[] getAssemblyLinesNames()
          Deprecated. Use getAssemblyLineNames().
 String getConfigId()
          Returns the configuration ID generated by the server.
 String getConfigPath()
          Retrieves the config path.
 MetamergeConfig getConfiguration()
          Returns configuration instance representing this configuration.
 PoolDefConfig getConnectorPoolConfig(String aConnectorPoolName)
          Returns the Connector Pool configuration object.
 int getConnectorPoolFreeNum(String aConnectorPoolName)
          Returns the number of free Connectors in the specified Connector Pool.
 String[] getConnectorPoolNames()
          Returns the names of all Connector Pools in the Config Instance.
 int getConnectorPoolSize(String aConnectorPoolName)
          Returns the size of the specified Connector Pool.
 ExternalPropertiesConfig getExternalProperties()
          Deprecated. use getTDIProperties() instead
 ExternalPropertiesConfig getExternalProperties(String aKey)
          Deprecated. use getTDIProperties() instead
 String[] getExternalPropertiesKeys()
          Deprecated. use getTDIProperties() instead
 String getGlobalUniqueID()
          Returns the Config Instance GUID.
 Date getInstanceBootTime()
          Returns the Instance boot time.
 ObjectName getTDIProperties()
          Access to the TDIProperies for the particular config.
 int purgeConnectorPool(String aConnectorPoolName)
          Unused Connectors will be released so that the Pool is shrunk to its minimum size.
 void reload()
          Reloads the Config Instance with its current configuration.
 void saveConfiguration()
          Deprecated. Not supported.
 void saveConfiguration(Boolean aEncrypt)
          Deprecated. Not supported.
 void saveExternalProperties()
          Deprecated. Not supported.
 void setConfiguration(MetamergeConfig aConfiguration)
          Sets given configuration to this configuration.
 void setExternalProperties(ExternalPropertiesConfig aExPropConfig)
          Deprecated. Not supported.
 void setExternalProperties(String aKey, ExternalPropertiesConfig aExPropConfig)
          Deprecated. Not supported.
 ObjectName startAssemblyLine(String aAssemblyLineName)
          Starts the specified AssemblyLine asynchronously.
 ObjectName startAssemblyLine(String aAssemblyLineName, Boolean aSync)
          Starts the specified AssemblyLine.
 ObjectName startAssemblyLine(String aAssemblyLineName, Entry aInputData)
          Starts the specified AssemblyLine with the given input data asynchronously.
 ObjectName startAssemblyLine(String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, Boolean aGetLogs)
          Starts asynchronously the specified AssemblyLine with the given input data and results listener.
 ObjectName startAssemblyLine(String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, Boolean aGetLogs, Boolean aSync)
          Starts the specified AssemblyLine with the given input data and results listener.
 ObjectName startAssemblyLine(String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, Boolean aGetLogs, Boolean aSync, Boolean aGetEntryOnEachCycle)
          Starts the specified AssemblyLine with the given input data and results listener.
 ObjectName startAssemblyLine(String aAssemblyLineName, Entry aInputData, Boolean aSync)
          Starts the specified AssemblyLine with the given input data.
 ObjectName startAssemblyLine(String aAssemblyLineName, TaskCallBlock aTcb)
          Starts asynchronously the specified AssemblyLine with the given TaskCallBlock.
 ObjectName startAssemblyLine(String aAssemblyLineName, TaskCallBlock aTcb, Boolean aSync)
          Starts the specified AssemblyLine with the given TaskCallBlock.
 ObjectName startAssemblyLineManual(String aAssemblyLineName, Entry aInputData)
          Starts the specified AssemblyLine with the given input data in manual mode.
 void stop()
          Stops the Config Instance.
 
Methods inherited from interface com.ibm.di.api.jmx.mbeans.BaseMBean
getId, getType
 

Method Detail

getConfigId

String getConfigId()
                   throws DIException
Returns the configuration ID generated by the server.

Example

 //for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
        
        var jmxUrl = new 
                javax.management.remote.JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector");
        var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl);
        var jmxMBeanServer = jmxConnector.getMBeanServerConnection();
        mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); 
        while (mBeans.hasNext()) {
        var mb = mBeans.next();
        if (mb.getClassName()=="com.ibm.di.api.jmx.mbeans.ConfigInstance")
        break; 
        }
 
        var on = mb.getObjectName();
        var res = jmxMBeanServer.getAttribute(on,"ConfigId");
        task.logmsg("Result "+ res);
  }
  
  Sample output: Result C__Documents and Settings_username_My Documents_TDI_rs.xml
 

Returns:
String object representing the configuration ID.
Throws:
DIException - if an error occurs while getting the configuration ID.

getConfiguration

MetamergeConfig getConfiguration()
                                 throws DIException
Returns configuration instance representing this configuration.

Returns:
MetamergeConfig object representing this configuration.
Throws:
DIException - if an error occurs while getting the configuration.

setConfiguration

void setConfiguration(MetamergeConfig aConfiguration)
                      throws DIException
Sets given configuration to this configuration.

Parameters:
aConfiguration - The new configuration.
Throws:
DIException - if an error occurs while setting the configuration.

saveConfiguration

@Deprecated
void saveConfiguration()
                       throws DIException
Deprecated. Not supported.

Throws:
DIException

saveConfiguration

@Deprecated
void saveConfiguration(Boolean aEncrypt)
                       throws DIException
Deprecated. Not supported.

Throws:
DIException

getExternalProperties

@Deprecated
ExternalPropertiesConfig getExternalProperties()
                                               throws DIException
Deprecated. use getTDIProperties() instead

Returns the external properties of the configuration.

Returns:
ExternalPropertiesConfig object representing the configuration’s external properties.
Throws:
DIException - if an error occurs while getting the external properties.

getExternalProperties

@Deprecated
ExternalPropertiesConfig getExternalProperties(String aKey)
                                               throws DIException
Deprecated. use getTDIProperties() instead

Returns the ExternalPropertiesConfig object for the named external properties object.

Parameters:
aKey - The external property object name.
Returns:
ExternalPropertiesConfig object representing the configuration’s external properties specified by the external property object name.
Throws:
DIException - if an error occurs while getting the external properties.

getExternalPropertiesKeys

@Deprecated
String[] getExternalPropertiesKeys()
                                   throws DIException
Deprecated. use getTDIProperties() instead

Returns the external properties object names.

Returns:
String array each value representing one external property object name.
Throws:
DIException - if an error occurs while getting the external properties names.

setExternalProperties

@Deprecated
void setExternalProperties(ExternalPropertiesConfig aExPropConfig)
                           throws DIException
Deprecated. Not supported.

Throws:
DIException

setExternalProperties

@Deprecated
void setExternalProperties(String aKey,
                                      ExternalPropertiesConfig aExPropConfig)
                           throws DIException
Deprecated. Not supported.

Throws:
DIException

saveExternalProperties

@Deprecated
void saveExternalProperties()
                            throws DIException
Deprecated. Not supported.

Throws:
DIException

getAssemblyLinesNames

String[] getAssemblyLinesNames()
                               throws DIException
Deprecated. Use getAssemblyLineNames().

Throws:
DIException

getAssemblyLineNames

String[] getAssemblyLineNames()
                              throws DIException
Returns the AssemblyLines’ names.

Returns:
String array each value representing AssemblyLine name.
Throws:
DIException - if an error occurs while getting the AssemblyLines’ names.

getAssemblyLineInputParameters

SchemaConfig getAssemblyLineInputParameters(String aAssemblyLineName)
                                            throws DIException
Returns the AssemblyLine’s input parameters.

Parameters:
aAssemblyLineName - the name of the AssemblyLine.
Returns:
SchemaConfig representing the schema input of the AssemblyLine.
Throws:
DIException - if an error occurs while getting the AssemblyLine's input parameters.

getAssemblyLineOutputParameters

SchemaConfig getAssemblyLineOutputParameters(String aAssemblyLineName)
                                             throws DIException
Returns the AssemblyLine’s output parameters.

Parameters:
aAssemblyLineName - the name of the AssemblyLine.
Returns:
SchemaConfig representing the schema output of the AssemblyLine.
Throws:
DIException - if an error occurs while getting the AssemblyLine's output parameters.

getAssemblyLines

ObjectName[] getAssemblyLines()
                              throws DIException
Returns the names of currently started AssemblyLines of the configuration each represented as ObjectName generated from AssemblyLine’s name and unique code.

Example

 //for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
        
        var jmxUrl = new 
                javax.management.remote.JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector");
        var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl);
        var jmxMBeanServer = jmxConnector.getMBeanServerConnection();
        mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); 
        while (mBeans.hasNext()) {
        var mb = mBeans.next();
        if (mb.getClassName()=="com.ibm.di.api.jmx.mbeans.ConfigInstance")
        break; 
        }
 
        var on = mb.getObjectName();
        var res = jmxMBeanServer.getAttribute(on,"AssemblyLines");
        task.logmsg("Result "+ res);
  }
  
  Sample output: Result ServerAPI:type=AssemblyLine,id=AssemblyLines/test.2
 

Returns:
ObjectName array each value representing ObjectName object of an AssemblyLine.
Throws:
DIException - if an error occurs while getting the AssemblyLines’ names.

startAssemblyLine

ObjectName startAssemblyLine(String aAssemblyLineName)
                             throws DIException
Starts the specified AssemblyLine asynchronously.

Example

 //for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
 
 var jmxUrl = new javax.management.remote.JMXServiceURL(
                "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector");
 var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl);
 var jmxMBeanServer = jmxConnector.getMBeanServerConnection();
 mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
 while (mBeans.hasNext()) {
        var mb = mBeans.next();
        if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance")
                break;
 }
 
 var on = mb.getObjectName();
 jmxMBeanServer.invoke(on, "startAssemblyLine", new Array("csv2xml"), new Array(
                "java.lang.String"));
 
 

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
Returns:
ObjectName generated from the name and the unique code of the given AssemblyLine.
Throws:
DIException - if an error occurs when starting the AssemblyLine.

startAssemblyLine

ObjectName startAssemblyLine(String aAssemblyLineName,
                             Boolean aSync)
                             throws DIException
Starts the specified AssemblyLine.

Example

 //for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
 
 var jmxUrl = new javax.management.remote.JMXServiceURL(
                "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector");
 var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl);
 var jmxMBeanServer = jmxConnector.getMBeanServerConnection();
 mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
 while (mBeans.hasNext()) {
        var mb = mBeans.next();
        if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance")
                break;
 }
 
 var on = mb.getObjectName();
 jmxMBeanServer.invoke(on, "startAssemblyLine", new Array("csv2xml",
                new Boolean("false")), new Array("java.lang.String",
                "java.lang.Boolean"));
 
 

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aSync - when true the AssemblyLine is started synchronously, when false the AssemblyLine is started asynchronously.
Returns:
ObjectName generated from the name and the unique code of the given AssemblyLine.
Throws:
DIException - if an error occurs when starting the AssemblyLine.

startAssemblyLine

ObjectName startAssemblyLine(String aAssemblyLineName,
                             Entry aInputData)
                             throws DIException
Starts the specified AssemblyLine with the given input data asynchronously.

Example

 //for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
 
 var jmxUrl = new javax.management.remote.JMXServiceURL(
                "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector");
 var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl);
 var jmxMBeanServer = jmxConnector.getMBeanServerConnection();
 mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
 while (mBeans.hasNext()) {
        var mb = mBeans.next();
        if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance")
                break;
 }
 
 var on = mb.getObjectName();
 jmxMBeanServer.invoke(on, "s", new Array("csv2xml", work), new Array(
                "java.lang.String", "com.ibm.di.entry.Entry"));
 
 

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aInputData - Initial Work Entry to run the AssemblyLine with.
Returns:
ObjectName generated from the name and the unique code of the given AssemblyLine.
Throws:
DIException - if an error occurs when starting the AssemblyLine.

startAssemblyLine

ObjectName startAssemblyLine(String aAssemblyLineName,
                             Entry aInputData,
                             Boolean aSync)
                             throws DIException
Starts the specified AssemblyLine with the given input data.

Example

 //for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
 
 var jmxUrl = new javax.management.remote.JMXServiceURL(
                "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector");
 var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl);
 var jmxMBeanServer = jmxConnector.getMBeanServerConnection();
 mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
 while (mBeans.hasNext()) {
        var mb = mBeans.next();
        if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance")
                break;
 }
 
 jmxMBeanServer.invoke(on, "startAssemblyLine", new Array("csv2xml", work,
                new Boolean("true")), new Array("java.lang.String",
                "com.ibm.di.entry.Entry", "java.lang.Boolean"));
 
 

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aInputData - Initial Work Entry to run the AssemblyLine with.
aSync - when true the AssemblyLine is started synchronously, when false the AssemblyLine is started asynchronously.
Returns:
ObjectName generated from the name and the unique code of the given AssemblyLine.
Throws:
DIException - if an error occurs when starting the AssemblyLine.

startAssemblyLine

ObjectName startAssemblyLine(String aAssemblyLineName,
                             Entry aInputData,
                             AssemblyLineListener aListener,
                             Boolean aGetLogs)
                             throws DIException
Starts asynchronously the specified AssemblyLine with the given input data and results listener.

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aInputData - Initial Work Entry to run the AssemblyLine with.
aListener - A listener for Entries produced by the AssemblyLine.
aGetLogs - when true the AssemblyLineListener delivers log messages, when false log messages are not delivered.
Returns:
ObjectName generated from the name and the unique code of the given AssemblyLine.
Throws:
DIException - if an error occurs when starting the AssemblyLine.

startAssemblyLine

ObjectName startAssemblyLine(String aAssemblyLineName,
                             Entry aInputData,
                             AssemblyLineListener aListener,
                             Boolean aGetLogs,
                             Boolean aSync)
                             throws DIException
Starts the specified AssemblyLine with the given input data and results listener.

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aInputData - Initial Work Entry to run the AssemblyLine with.
aListener - A listener for Entries produced by the AssemblyLine.
aGetLogs - when true the AssemblyLineListener delivers log messages, when false log messages are not delivered.
aSync - when true the AssemblyLine is started synchronously, when false the AssemblyLine is started asynchronously.
Returns:
ObjectName generated from the name and the unique code of the given AssemblyLine.
Throws:
DIException - if an error occurs when starting the AssemblyLine.

startAssemblyLine

ObjectName startAssemblyLine(String aAssemblyLineName,
                             Entry aInputData,
                             AssemblyLineListener aListener,
                             Boolean aGetLogs,
                             Boolean aSync,
                             Boolean aGetEntryOnEachCycle)
                             throws DIException
Starts the specified AssemblyLine with the given input data and results listener.

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aInputData - Initial Work Entry to run the AssemblyLine with.
aListener - A listener for Entries produced by the AssemblyLine.
aGetLogs - when true the AssemblyLineListener delivers log messages, when false log messages are not delivered.
aSync - when true the AssemblyLine is started synchronously, when false the AssemblyLine is started asynchronously.
aGetEntryOnEachCycle - when true the AssemblyLineListener delivers the current entry on each AssemblyLine cycle, when false the entries are not delivered.
Returns:
ObjectName generated from the name and the unique code of the given AssemblyLine..
Throws:
DIException - if an error occurs when starting the AssemblyLine.

startAssemblyLineManual

ObjectName startAssemblyLineManual(String aAssemblyLineName,
                                   Entry aInputData)
                                   throws DIException
Starts the specified AssemblyLine with the given input data in manual mode.

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aInputData - Initial Work Entry to run the AssemblyLine with.
Returns:
ObjectName generated from the mbean server domain name and the key property list of the AssemblyLineHandler of the given AssemblyLine.
Throws:
DIException - if an error occurs when starting the AssemblyLine.

startAssemblyLine

ObjectName startAssemblyLine(String aAssemblyLineName,
                             TaskCallBlock aTcb)
                             throws DIException
Starts asynchronously the specified AssemblyLine with the given TaskCallBlock.

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aTcb - The TaskCallBlock object to start the AL with.
Returns:
ObjectName generated from the name and the unique code of the given AssemblyLine.
Throws:
DIException - if an error occurs when starting the AssemblyLine.

startAssemblyLine

ObjectName startAssemblyLine(String aAssemblyLineName,
                             TaskCallBlock aTcb,
                             Boolean aSync)
                             throws DIException
Starts the specified AssemblyLine with the given TaskCallBlock.

Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aTcb - The TaskCallBlock object to start the AL with.
aSync - when true the AssemblyLine is started synchronously, when false the AssemblyLine is started asynchronously.
Returns:
ObjectName generated from the name and the unique code of the given AssemblyLine.
Throws:
DIException - if an error occurs when starting the AssemblyLine.

reload

void reload()
            throws DIException
Reloads the Config Instance with its current configuration.

Throws:
DIException - if an error occurs while reloading the server.

stop

void stop()
          throws DIException
Stops the Config Instance.

Example

 //for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
 
 var jmxUrl = new javax.management.remote.JMXServiceURL(
                "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector");
 var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl);
 var jmxMBeanServer = jmxConnector.getMBeanServerConnection();
 mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
 while (mBeans.hasNext()) {
        var mb = mBeans.next();
        if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance")
                break;
 }
 
 var on = mb.getObjectName();
 jmxMBeanServer.invoke(on, "stop", null, null);
 
 

Throws:
DIException - if an error occurs while stopping.

getALLogFileNames

String[] getALLogFileNames(String aALName)
                           throws DIException
Returns the names of all available log files for a given AssemblyLine.

Parameters:
aALName - the name of the AssemblyLine.
Returns:
a String array, each of its elements specifying the name of a log file.
Throws:
DIException - if an error occurs while obtaining AssemblyLine's log file names.

getALLastLogFileName

String getALLastLogFileName(String aALName)
                            throws DIException
Returns the name of the log file created on the last run of a given AssemblyLine.

Parameters:
aALName - the name of the AssemblyLine.
Returns:
the name of the log file created on the last AssemblyLine's run.
Throws:
DIException - if an error occurs while obtaining the log file name.

getALLog

String getALLog(String aALName,
                String aLogFileName)
                throws DIException
Given an AssemblyLine name, and a log file name, retrieves the log of this AssemblyLine, stored in the specified file.

Parameters:
aALName - the name of the AssemblyLine.
aLogFileName - the name of the log file; no file path should be specified - just the file name.
Returns:
the specified log of the AssemblyLine.
Throws:
DIException - if an error occurs while obtaining AssemblyLine's log.

getALLogLastChunk

String getALLogLastChunk(String aALName,
                         String aLogFileName,
                         Integer aKilobytes)
                         throws DIException
Retrieves the last chunk from a specified AssemblyLine's log file.

Parameters:
aALName - the name of the AssemblyLine.
aLogFileName - the name of the log file; no file path should be specified - just the file name.
aKilobytes - specifies in kilobytes the size of the log's last chunk that will be read.
Returns:
the last chunk of the specified AssemblyLine's log.
Throws:
DIException - if an error occurs while obtaining AssemblyLine's log.

getInstanceBootTime

Date getInstanceBootTime()
                         throws DIException
Returns the Instance boot time.

Returns:
a java.util.Date specifying the date and time the instance was started.
Throws:
DIException - if an error occurs while retrieving instance's boot time.

getGlobalUniqueID

String getGlobalUniqueID()
                         throws DIException
Returns the Config Instance GUID. The GUID is a string value that is unique for each component ever created by a particular TDI Server.

Example

 //for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
        
        var jmxUrl = new 
                javax.management.remote.JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector");
        var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl);
        var jmxMBeanServer = jmxConnector.getMBeanServerConnection();
        mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); 
        while (mBeans.hasNext()) {
        var mb = mBeans.next();
        if (mb.getClassName()=="com.ibm.di.api.jmx.mbeans.ConfigInstance")
        break; 
        }
 
        var on = mb.getObjectName();
        var res = jmxMBeanServer.getAttribute(on,"GlobalUniqueID");
        task.logmsg("Result "+ res);
  }
  
  Sample output:Result 17135304020
 

Returns:
The Config Instance GUID value.
Throws:
DIException - if an error occurs while retrieving GlobalUniqueID.

getConnectorPoolNames

String[] getConnectorPoolNames()
                               throws DIException
Returns the names of all Connector Pools in the Config Instance.

Returns:
String array containing the Connector Pool names.
Throws:
DIException - if an error occurs while retrieving Connector Pool names.

getConnectorPoolSize

int getConnectorPoolSize(String aConnectorPoolName)
                         throws DIException
Returns the size of the specified Connector Pool.

Parameters:
aConnectorPoolName - the name of the Connector Pool.
Returns:
The current size of the specified Connector Pool.
Throws:
DIException - if an error occurs while retrieving Connector Pool size.

getConnectorPoolFreeNum

int getConnectorPoolFreeNum(String aConnectorPoolName)
                            throws DIException
Returns the number of free Connectors in the specified Connector Pool.

Parameters:
aConnectorPoolName - the name of the Connector Pool.
Returns:
The number of free Connectors in the specified Connector Pool.
Throws:
DIException - if an error occurs while retrieving Connector Pool free Connectors.

getConnectorPoolConfig

PoolDefConfig getConnectorPoolConfig(String aConnectorPoolName)
                                     throws DIException
Returns the Connector Pool configuration object.

Parameters:
aConnectorPoolName - the name of the Connector Pool.
Returns:
The configuration object for the specified Connector Pool.
Throws:
DIException - if an error occurs while retrieving Connector Pool configuration object.

purgeConnectorPool

int purgeConnectorPool(String aConnectorPoolName)
                       throws DIException
Unused Connectors will be released so that the Pool is shrunk to its minimum size.

Parameters:
aConnectorPoolName - the name of the Connector Pool.
Returns:
The size of the Connector Pool after shrinking.
Throws:
DIException - if an error occurs while shrinking the Connector Pool to its minimum size.

getTDIProperties

ObjectName getTDIProperties()
                            throws Exception
Access to the TDIProperies for the particular config.

Returns:
ObjectName containing the TDI Properties of the Config.
Throws:
Exception - if an error occurs while getting TDI Properties

getConfigPath

String getConfigPath()
Retrieves the config path.

Example

 //for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
        
        var jmxUrl = new 
                javax.management.remote.JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector");
        var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl);
        var jmxMBeanServer = jmxConnector.getMBeanServerConnection();
        mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); 
        while (mBeans.hasNext()) {
        var mb = mBeans.next();
        if (mb.getClassName()=="com.ibm.di.api.jmx.mbeans.ConfigInstance")
        break; 
        }
 
        var on = mb.getObjectName();
        var res = jmxMBeanServer.getAttribute(on,"ConfigPath");
        task.logmsg("Result "+ res);
  }
  
  Sample output:Result C:\Documents and Settings\Username\My Documents\TDI\rs.xml
 

Returns:
The absolute path of the configuration file.