Connectors have two types of configuration properties: standard configuration properties and adapter-specific configuration properties. You must set the values of these properties using Connector Configurator before running the adapter. For further information, see Appendix B, Connector Configurator.
A connector obtains its configuration values at startup. During a runtime session, you may want to change the values of one or more connector properties. Changes to some connector configuration properties, such as AgentTraceLevel, take effect immediately. Changes to other connector properties require connector component restart or system restart after a change. To determine whether a property is dynamic (taking effect immediately) or static (requiring either connector component restart or system restart), refer to the Update Method column in the Connector Properties window of the System Manager.
Standard connector configuration properties provide information that all adapters use. See Appendix A, Standard configuration properties for connectors for documentation of these properties.
Although the following properties are listed in Appendix A, Standard configuration properties for connectors, the connector for CORBA does not use them:
You must provide a value for the ApplicationName configuration property before running the connector.
Connector-specific configuration properties provide information needed by the connector at runtime. These properties also provide a way for you to change static information or logic within the connector without having to recode and rebuild it.
To configure connector-specific properties, use Connector Configurator. Click the Application Config Properties tab to add or modify configuration properties. For more information, see Appendix B, Connector Configurator.
Note that all the connector-specific properties are optional, unless otherwise noted, in that you can choose to set them based on your specific connector configuration requirements. For example, when running the connector as a client, do you want the connector to create both factory objects and connections, only a factory object, or only connections? The configuration you choose determines which properties you must set.
Table 2 lists the connector-specific configuration properties for
the connector, along with their descriptions and possible values. The
+ character indicates the entry's position in the property
hierarchy. See the sections that follow for details about the
properties, including the hierarchy of these properties illustrated in Figure 5.
Table 2. Connector-specific configuration properties
Name | Possible values | Default value |
---|---|---|
+ Factory | None. This is simply a category in the hierarchy. | None |
+ + FactoryClass | The class name | None |
+ + FactoryMethod | The method name | None |
+ + + Arguments | Any encrypted or non-encrypted strings |
|
+ + FactoryInitializer | The method name of the initializer | None |
+ + + ior_file_name | The directory and file name of the IOR file. | None |
+ + + name | The name of the object used for getting the factory; for example: HelloServerServerObject | None |
+ ConnectionPool | None. This is simply a category in the hierarchy. | None |
+ + ConnectionClass | Class name | None |
+ + ConnectionInitializer | Method name of the initializer | None |
+ + + Arguments | Any encrypted or non-encrypted strings | None |
+ + PoolSize | Any integer | 0 |
+ UseNamingContext | True, False | None |
+ ClientOnly | True, False | None |
+ BO_COLLAB_MAPPING | The business object and verb mapped to the collaboration. The
structure is:
| None |
+ CORBAServerName | A valid CORBA server name; for example, CORBAAdapter. | None |
+ BO_CONNECTION_PROP | The name of the business object mapped to the ior_file_name or
name; for example:
Customer mapped to ior_file_name=c:\psrserver.ior; name=; | None |
+ ORBInitialHost | The host name of the CORBA name server. Must be the IBM ORB Transient Naming Server. | None |
+ ORBInitialPort | The port number of the CORBA name server. Must be the IBM ORB Transient Naming Server. | None |
Figure 5 illustrates the hierarchical relationship of the connector-specific properties.
Figure 5. Hierarchy of connector-specific properties
A hierarchical property that represents the category of the Factory class information.
The name of the factory class.
You can use this property when the connector runs as a client.
A hierarchical property that represents the name of the FactoryMethod on the FactoryClass. If you specify a FactoryMethod, ConnectionInitializer is called on the connection object it gets from the Factory method (after that object is created).
You can use this property when the connector runs as a client.
The parameters of the FactoryMethod must be arguments (Argument1, Argument2, and so on) on the FactoryClass, listed in proper sequential order. The property names are Argument1, Argument2, and so on, for as many parameters as the method takes. The value of each argument is any encrypted or non-encrypted string
You can use this property when the connector runs as a client.
A hierarchical property that represents the way the Factory class must be initialized.
You can use this property when the connector runs as a client.
The name of the ior_file for the Factory object. The connector uses this property to instantiate the Factory object. You can specify this property, or name, or both.
You can use this property when the connector runs as a client.
The name of the object used for getting the Factory. This property is used to instantiate the Factory object and is required if you have not specified a value for ior_file_name. This property is also required if the adapter uses a naming context (the useNamingContext property is set to true).
You can use this property when the connector runs as a client.
A hierarchical property that represents the category of the Connection class information.
The name of the poolable connection class.
The size of the pool (number of connections) is based on the value you specify in the PoolSize property.
If you use connection pooling on a multi-use server (one instance of a server object can be re-used to create a connection), then you have to set up a factory and factory method call to create the connection pool. In this case, each BO handler thread pulls a discrete connection from the pool to be used during processing.
You can use this property when the connector runs as a client.
The name of the poolable ConnectionClass initializer method.
If you specify a FactoryMethod, ConnectionInitializer is called on the connection object it gets from the FactoryMethod (after that object is created).
You can use this property when the connector runs as a client.
The parameters of the ConnectionInitializer must be arguments (Argument1, Argument2, and so on) on the ConnectionClass, listed in proper sequential order. The property names are Argument1, Argument2, and so on, for as many parameters as the initializer takes. The value of each argument is any encrypted or non-encrypted string
You can use this property when the connector runs as a client.
Determines the size of the connection pool. The default value is 0.
This property is required if the ConnectionClass is specified. Use this property when the connector runs as a client.
A boolean true/false flag that indicates whether or not the connector uses the CORBA naming service to look up the object with the specified value for name. For details about the naming services, see IBM ORB Transient Naming Server.
This is a required property when the connector runs as either a client or a server.
A boolean true/false flag that indicates whether or not the connector runs as a CORBA client. If the flag is set to false, then the connector runs as both a CORBA server and a client.
This is a required property.
If the connector runs as a CORBA server (the ClientOnly property is set to false), this hierarchical property is used to map a business object and its verb (businessObject.verb) to a collaboration. The collaboration executes when an external CORBA client places a method call against a server object. After receiving the method call, the connector converts the method to the appropriate verb (as specified in the object's attribute ASI). Then, using the verb-collaboration mapping specified in the BO_COLLAB_MAPPING property, the server object calls the executeCollaboration() method, which in turn executes the appropriate collaboration for that verb.
This property is required only when the connector processes business objects that map to CORBA servers. Use this property when the connector runs only as a server.
The name that is used when registering the connector as a CORBA server.
This property is required only when the connector processes business objects that map to CORBA servers. Use this property when the connector runs only as a server.
The information required for mapping business objects to connection information. You set this property when the connector runs as a client. The information includes the name of the supported client business object, the ior_file_name and the name. For example, if the connector has two supported business objects, CORBACustomer and CORBAAccount, the BO_CONNECTION_PROP setting is as follows:
CORBACustomer=ior_file_name=<fileName>;name=<name>
CORBAAccount=ior_file_name=<fileName>;name=<name>
The connector uses this property in one of the following ways, depending on the values provided in the property setting:
If neither of these property setting scenarios is true (in other words ior_file_name and name are blank), then the connector logs an error in the log file stating that the necessary connection information is missing for the business object. In addition, the BO handler is not initialized for the given business object. For details about error logging, see Troubleshooting and error handling.
This property is required only when the connector processes business objects that run as CORBA clients.
The host name of the IBM ORB Transient Name Server. Whether the connector runs as a client or server, it must use the naming services of the IBM ORB Transient Naming Server. For details about the naming server, see IBM ORB Transient Naming Server.
This property is required. It is used by the connector to connect to a CORBA server, or to act as a server itself. Even if the name server is running on the same host as the connector, you must specify this.
The port number of the IBM ORB Transient Name Server. Whether the connector runs as a client or server, it must use the naming services of the IBM ORB Transient Naming Server. For details about the naming server, see IBM ORB Transient Naming Server.
This property is required. It is used by the connector to connect to a CORBA server, or to act as a server itself. Even if the name server is running on the default port (900), you must specify this.
This section provides examples of the following configuration scenarios:
When you run the connector as a client that makes calls to an external CORBA server, determine in advance which service--Transient Name Server (TNS) or Interoperable Object Reference (IOR)--the server is using, so as to set connector properties accordingly. With TNS, the adapter calls go through the network, whereas with IOR, the calls are file-based in that the network information required to locate the server is stored in an IOR file that the adapter reads.
The following sample IDL file (HelloFactory.idl) is used to generate business objects required by the connector when it runs as a client, using the FactoryClass and ConnectionClass, against a server that uses TNS. For an example of the connector running as a simple client without the FactoryClass and ConnectionClass, see Configuring the connector to run as a simple client without using a FactoryClass and ConnectionClass.
module HelloAppFactory { interface HelloApp { string sayHello(); }; interface HelloFactory { HelloApp getHello(); HelloApp getHelloUsingName(in string name); }; };
The sample code contains the following elements:
Table 3 provides sample configuration settings of some of the
connector-specific properties for the HelloFactory.idl
scenario. For a complete list of connector-specific properties,
see Table 2.
Table 3. Connector-specific properties for HelloFactory.idl scenario (Server configuration)
Connector-specific property | Value |
---|---|
UseNamingContext | true |
ClientOnly | true |
FactoryClass | HelloAppFactory.HelloFactory |
FactoryInitializer > name | HelloApp_HelloFactoryServerNaming |
FactoryMethod | getHello |
ConnectionClass | HelloAppFactory.Hello |
PoolSize | 10 |
BO_CONNECTION_PROP | Client_HelloAppFactory_HelloFactory |
Client_HelloAppFactory_HelloFactory | name=HelloApp_HelloFactoryServerNaming |
If the connector is running as a client and making calls to a CORBA server that uses the IOR service rather than TNS, note the following requirements:
The following sample IDL file for module corbaadapter_sample defines an interface (Hello) that is used to generate business objects required by the connector when it runs as a client with TNS but not using the FactoryClass and ConnectionClass. For an example of the connector running as a client that uses the FactoryClass and ConnectionClass, see Configuring the connector to run as a client using a FactoryClass and ConnectionClass.
//code for simple client and server config
module corbaadapter_sample
{
typedef sequence<long> LongSeq;
typedef sequence<string> StringSeq;
interface Hello
{
//simple type tests
string simpleIn(in LongSeq in_long_val, in double in_amount,
in boolean in_istrue ,in string in_firstNm)
raises (ProcessingFailureException);
StringSeq simpleOut(out LongSeq out_long_val,
out double out_amount,out boolean out_istrue ,
out string out_firstNm) raises (ProcessingFailureException);
};
};
Table 4 provides sample configuration settings for the
connector-specific properties you configure when using module
corbaadapter_sample, which defines interface Hello.
For a complete list of connector-specific properties, see Table 2.
Connector-specific property | Value |
---|---|
UseNamingContext | true |
ClientOnly | true |
Notice in this scenario that ClientOnly is set to true and that the FactoryClass, FactoryInitializer, FactoryMethod, ConnectionClass, and ConnectionPool properties are not used. These properties are relevant only when configuring the connector as a client that uses the FactoryClass and ConnectionClass.
When you configure the connector to run as a server, it can receive requests from external CORBA clients. These requests invoke collaborations on the integration broker.
The following sample IDL file for module corbaadapter_sample defines an interface (interface Hello) that is exposed to CORBA clients when the connector is configured with the property settings listed in Table 5. When the connector runs as a server, it uses the business objects created from this IDL file to service requests from CORBA clients.
//code for simple client and server config
module corbaadapter_sample
{
typedef sequence<long> LongSeq;
typedef sequence<string> StringSeq;
interface Hello
{
//simple type tests
string simpleIn(in LongSeq in_long_val, n double in_amount,
in boolean in_istrue ,in string in_firstNm) raises
(ProcessingFailureException);
StringSeq simpleOut(out LongSeq out_long_val,
out double out_amount,out boolean out_istrue ,
out string out_firstNm) raises (ProcessingFailureException);
};
};
Table 5 provides sample configuration settings for the
connector-specific properties you set when using module
corbaadapter_sample, which defines interface Hello.
For a complete list of connector-specific properties, see Table 2.
Table 5. Connector-specific properties for interface Hello scenario (Server configuration)
Connector-specific property | Value |
---|---|
UseNamingContext | true |
ClientOnly | false |
BO_COLLAB_MAPPING | Server_corbaadapter_sample_Hello.Create |
Notice that in this scenario the FactoryClass, FactoryInitializer, FactoryMethod, ConnectionClass, and ConnectionPool properties are not used, as these properties are only relevant when configuring the connector as a client that uses the FactoryClass and ConnectionClass.
The BO_COLLAB_MAPPING property represents the server object (formatted as businessObjectName.verb) that the connector, acting as a server, maps to a collaboration. The collaboration runs when an external CORBA client places a method call against an instance of this server object, which creates the interface defined in module corbaadapter_sample.