Configuring Java CAPS Project Components for Communication Adapters

Configuring TCP/IP Adapter Inbound Connectivity Map Properties

The inbound property settings determine the adapter's behavior for input operations.

The TCP/IP inbound adapter configuration parameters, accessed from the Connectivity Map, are organized into the following sections:

Where to Go Next

General Inbound Settings — TCP/IP Adapter Inbound.

Related Topics

The following section contains a brief description on upgrading the adapter Java CAPS 5.1.x to 6 Upgrade Procedure.

General Inbound Settings — TCP/IP Adapter Inbound

The General Inbound Settings properties provide the dedicated session mode and maximum data size message settings for the server. This section contains the top-level parameters as displayed in the table.

Table 111 Connectivity Map - General Inbound Settings

Name 

Description 

Required Value 

Max Data Size

Allows you to define the maximum size of the data that the programs can hold internally. 

The valid range is from 1 to 2 GB (the maximum value of the Java integer). 

The configured default is 2147483647..

Scope Of State

Defines the scope of State object, which is an OTD node. The options for this parameter are: 

  • Resource Adapter Level: The State has the same life cycle as the resource adapter.

  • Persistence: The State is persisted in the storage media like file or DB (Persistence State File Location must be specified if this option is selected).

  • Connection Level: The State has the same life cycle as the connection.

  • OTD Level: The State has the same life cycle as the OTD object.

    This scope represents the life cycle of the State.

Select one of the following: 

  • Resource Adapter Level

  • Connection Level

  • OTD Level

The configured default is Resource Adapter Level.

Dedicated Session Mode

Allows you to enable or disable the adapter's Dedicated Session Mode. When the Dedicated Session Mode is enabled in a server, the current client’s request can exclusively hold the server port to which it connects. 

For example, if this property is enabled, and the client is connected to a server, it only serves the client until the work is completed, and the session is disconnected. If another client tries to connect to the server during this time, it cannot until the session is completed. 

Select True or False. True indicates that Dedicated Session Mode is enabled.

The configured default is False.

Where to Go Next

TCPIP Inbound Settings — TCP/IP Adapter Inbound.

Related Topics

TCPIP Inbound Settings — TCP/IP Adapter Inbound

The TCPIP Inbound Settings properties provide the basic TCP/IP values for the server. The TCP/IP Inbound Settings properties contain the top-level parameters as displayed in the table.

Table 112 Connectivity Map - TCPIP Inbound Settings

Name 

Description 

Required Value 

Connection Type

Specifies how the adapter establishes the TCP/IP connection: 

  • Client: The adapter connects to an external server (host/port) to establish the connection. The adapter is in active mode.

  • Server: The adapter waits/listens on a certain port for an incoming connection request from an external client. Once the request is received, the adapter accepts the request and establishes the connection. The adapter is in passive mode.

Select Client or Server.

Server is the default setting. Unless you specifically require Client mode, leave this value as the default: Server.

ServerSO Timeout

Allows you to set or get the server SO_TIMEOUT value, in milliseconds.

The server's SO_TIMEOUT value is in milliseconds.

The default value is 10000 milliseconds (10 seconds).

Server Socket Factory Implementation Class Name

Enter the name of the Java class that implements the server socket factory. This class is used to create the server socket. If you have provided your own server socket implementation, enter the name of the Java class that contains this implementation. The factory implementation class must implement the following interface: 


com.stc.connector.tcpip.model.factory.
TCPIPSocketFactory

A valid Java class name; the default is: 


com.stc.connector.tcpip.model.
factory.TCPIPSocketFactoryIm
pl

Keep Alive

Specifies whether the server’s SO_KEEPALIVE option is enabled or disabled. It is used for the accepted client socket.


Note –

For some properties, the server socket itself does not have direct properties settings associated with it. Instead, the properties map have direct properties settings associated to the accepted client socket.


Select True or False.

True indicates that the server SO_KEEPALIVE option is enabled.

The configured default is True.

Receive Buffer Size

Allows you to set or get the value of the server's SO_RCVBUF option for the current socket, that is, the buffer size used by the operating system for input on this socket. It is used for the accepted client socket.

A number indicating the receive buffer size. 

The configured default is 8192.

Send Buffer Size

Allows you to set or get the value of the server's SO_SNDBUF option for the current socket, that is, the buffer size used by the operating system for output on this socket. It is used for the accepted client socket.

A number indicating the send buffer size. 

The configured default is 8192.

SoLinger

Specifies whether the server's SO_LINGER option is enabled or disabled; used for the accepted client socket.

Select True or False.

True enables the SO_LINGER option.

The configured default value is True.

SoLinger Timeout

Specifies the server’s linger time-out in seconds. The maximum time-out value is platform specific. The setting only affects the socket close; used for the accepted client socket. 

The linger time-out in seconds. The configured default is 30 seconds, indicating that the SO_LINGER option is disabled.

SoTimeout

Allows you to set or get the value of the server's SO_TIMEOUT value, in milliseconds. Used for the accepted client socket.

A time-out of 0 (zero) is an infinite time-out. If you specify this value, the adapter goes into an infinite read. If this action happens, it is recorded in the adapter's log file. 

The SO_TIMEOUT value in milliseconds.

The configured default value is 10000 milliseconds (10 seconds).

TcpNoDelay

Specifies whether the server’s TCP_NODELAY option (that is, Nagle’s algorithm) is enabled or disabled. Used for the accepted client socket.

Select True or False.

True enables the TCP_NODELAY option.

The configured default value is False.

Where to Go Next

TCPIP Inbound Settings - Server Port Binding — TCP/IP Adapter Inbound.

Related Topics

TCPIP Inbound Settings - Server Port Binding — TCP/IP Adapter Inbound

The Server Port Binding section defines the configuration parameters used for controlling the server port binding. The TCP/IP Inbound Settings — Server Port Binding properties contain the top-level parameters as displayed in the table.

Table 113 Connectivity Map - TCPIP Inbound Settings - Server Port Binding

Name 

Description 

Required Value 

Max Binding Retry

Specifies the maximum number of times the adapter attempts to bind to the specified TCP/IP port on the localhost. 

An integer indicating the number of bind attempts. 

The configured default is 3.

Retry Binding Interval

Specifies the amount of time (in milliseconds) the adapter waits between attempts to bind to the specified TCP/IP port on the localhost. 

An integer indicating the amount of time in milliseconds that the adapter waits between attempts. 

The configured default is 30000 (30 seconds).

Where to Go Next

TCPIP Inbound Settings - Client Connection Establishment — TCP/IP Adapter Inbound.

Related Topics

TCPIP Inbound Settings - Client Connection Establishment — TCP/IP Adapter Inbound

The Client Connection Establishment properties define some of the configuration parameters used for controlling the connection establishment. This section is used only when the Connection Type is set as Client.

This section of the TCP/IP inbound adapter Connectivity Map properties contains the top-level parameters as displayed in the table.

Table 114 Connectivity Map - TCPIP Inbound Settings - Client Connection Establishment

Name 

Description 

Required Value 

Time to Wait Before Attempting Connection

Specifies the amount of time (in milliseconds) the adapter waits before attempting to connect to the external system. 

A number indicating the amount of time (in milliseconds) the adapter waits before attempting to connect to an external system. 

The configured default is 30000 (30 seconds).

Where to Go Next

TCPIP Inbound Settings - Inbound Connection Management — TCP/IP Adapter Inbound.

Related Topics

TCPIP Inbound Settings - Inbound Connection Management — TCP/IP Adapter Inbound

The Inbound Connection Management properties define the parameters used for inbound Server Connection Management. For example, the connection pool and the life cycle of the accepted connection.

This section of the TCP/IP HL7 inbound adapter Connectivity Map properties contains the top-level parameters is as displayed in the table.

Table 115 Connectivity Map - TCPIP Inbound Settings - Inbound Connection Management

Name 

Description 

Required Value 

Max Connection Pool Size

Specifies the maximum number of concurrent connections allowed for the specific listener/monitor which is listening or monitoring a specified TCP/IP port. This represents the capability or availability of this server’s services. Each connect-request from a client gains one concurrent connection. This parameter also represents the maximum number of clients who can concurrently connect to this server’s services, and get served by the specific listener/monitor at the same time. 

A number indicating the maximum number of concurrent connections available from a listener/monitor for a specific TCP/IP port. 0 indicates that there is no limit.

The configured default is 50.

Scope Of Connection

Specifies the scope of the accepted connection which is used by the adapter. The two options are: 

  • Resource Adapter Level: The resource adapter will close the connection upon receiving a closure request, so the connection may keep alive during multiple executions of the Collaboration.

  • Collaboration Level: The connection is closed once the Collaboration has been executed, so the connection has the same life cycle as the Collaboration.

Select Resource Adapter Level or Collaboration Level.

The configured default value is Resource Adapter Level.

Close Notification

Specifies the close notification value. When the server receives a notification with content that matches this parameter’s value, the server safely closes the connection and cancels any corresponding schedules. 

A String indicating the trigger value that notifies the server to close the connection. 

The configured default is QUIT.

Idle Timeout

Specifies the length of time (in milliseconds) for inactivity of the requestor (client). The adapter attempts to detect activity on client side (the other side of the connection). If no client activity (no i/o request comes over the connection from the client) for a specified time period, then the connection is closed from the server side to release the resource. The value is in milliseconds. 

An integer that indicates the amount of time (in milliseconds) for inactivity of the requestor (client) before the connection is closed from the server side to release the resource. A value of 0 disables IdleTimeout.

The configured default is 60000 (1 minute).

Where to Go Next

TCPIP Inbound Schedules - Listener Schedule — TCP/IP Adapter Inbound.

Related Topics

TCPIP Inbound Schedules - Listener Schedule — TCP/IP Adapter Inbound

This section configures the scheduler used by the inbound TCP/IP Server. The server waits for a new client connection establishment request. These parameters are used to configure the listener/monitor that listens on the specified port.

Two J2EE schedulers are available (see Scheduler):

Both schedulers provide the functionality required by the inbound TCP/IP Server.

This section of the TCP/IP HL7 inbound adapter Connectivity Map properties contains the top-level parameters is as displayed in the table.

Table 116 Connectivity Map - TCPIP Inbound Schedules - Listener Schedule

Name 

Description 

Required Value 

Scheduler

Specifies the scheduler type for this inbound communication. There are two options: 

  • Timer Service: The scheduler is configured using the At Fixed Rate, Delay and Period properties.

  • Work Manager: The task is scheduled through the J2EE Work Manager. Work Manager is supported by J2EE (JCA 1.5 and above). This scheduler is configured using the Delay and Period properties

Select Timer Service or Work Manager.

If your container doesn’t support JCA Work Manager, select Timer Service.

Schedule Type

This property configuration, though visible from the Properties Editor, is disabled. The only available schedule type is Repeated, indicating that the task is scheduled for repeated execution at regular intervals defined by the Period property in this section (see Period).

This property is disabled. 

Delay

Applies to both the Timer Service or the Work Manager. Specifies, in milliseconds, the length of delay time before the task is executed.

An integer indicating the amount of time before the task is executed, in milliseconds (1000 milliseconds is equal to 1 second). 

Period

Specifies the regular interval, in milliseconds, between successive repeated task executions. This is used for the Repeated Schedule Type. See Schedule Type. Applies to both the Timer Service or the Work Manager.

An integer indicating the amount of time between successive task executions, in milliseconds. 

Enter a positive integer. The configured default is 100. Lowering this value may increase the number of transactions per second.

At Fixed Rate

Specific to the Timer Service configuration only. Specifies whether a Fixed-Rate execution or Fixed-Delay execution is used.

  • Fixed-Rate: A fixed-rate execution means that each execution is scheduled relative to the scheduled time of the initial execution. If an execution is delayed for any reason (such as garbage collection or other background activity), two or more executions will occur in rapid succession to catch up. In the long run, the frequency of execution will be exactly the reciprocal of the specified period (assuming the system clock underlying Object.wait(long) is accurate).

  • Fixed-Delay: A fixed-delay execution means that each execution is scheduled relative to the actual time of the previous execution. If an execution is delayed for any reason (such as garbage collection or other background activity), subsequent executions will be delayed as well. As a result, the frequency of execution will generally be slightly lower than the reciprocal of the specified period, assuming the system clock underlying Object.wait(long) is accurate.

Select True or False.

True indicates that a fixed-rate execution is used. False indicates that a fixed-delay execution is used.

Where to Go Next

TCPIP Inbound Settings - Service Schedule — TCP/IP Adapter Inbound.

Related Topics

TCPIP Inbound Settings - Service Schedule — TCP/IP Adapter Inbound

This section configures the scheduler used by the TCP/IP Server that executes the business tasks (Collaboration Rules) over the existing connection. This scheduler affects the actual Business Rules defined by the user.

Two J2EE schedulers are available (see Scheduler):

Both schedulers provide the functionality required by the inbound TCP/IP Server.

This section of the TCP/IP inbound adapter Connectivity Map properties contains the top-level parameters as displayed in the table.

Table 117 Connectivity Map - TCPIP Inbound Settings - Server Schedule

Name 

Description 

Required Value 

Scheduler

Specifies the scheduler type for this inbound communication. There are two options: 

  • Timer Service: This scheduler is configured using the At Fixed Rate, Delay, and Period properties.

  • Work Manager: The task is scheduled through the J2EE Work Manager. Work Manager is supported by J2EE (JCA 1.5 and above). This scheduler is configured using the Delay and Period properties.

Select Timer Service or Work Manager.

If your container doesn’t support JCA Work Manager, select Timer Service .

Schedule Type

Applies to both the Timer Service or the Work Manager. Specifies whether the task is scheduled to occur once or be repeated.

  • OneTime: The task will be scheduled for one-time execution.

  • Repeated: The task will be scheduled for repeated execution at regular intervals defined by Period property in this section (see Period).

Select OneTime or Repeated.

Delay

Applies to both the Timer Service or the Work Manager. Specifies, in milliseconds, the length of delay time before the task is executed.

An integer indicating the amount of time, in milliseconds, before the task is executed (1000 milliseconds is equal to 1 second). 

Period

Specifies the wait interval in milliseconds between successive repeated task executions. This is used for the Repeated Schedule Type (see Schedule Type). Applies to both the Timer Service or the Work Manager.

An integer indicating the amount of time, in milliseconds, between successive task executions (1000 milliseconds is equal to 1 second). 

Enter a positive integer. The configured default is 100. Lowering this value may increase the number of transactions per second.

At Fixed Rate

Specific to the Timer Service configuration only. Specifies whether a Fixed-Rate execution or Fixed-Delay execution is used. This is used for the “Repeated” schedule type by the “Timer Service” scheduler.

  • Fixed-Rate: A fixed-rate execution means that each execution is scheduled relative to the scheduled time of the initial execution. If an execution is delayed for any reason (such as garbage collection or other background activity), two or more executions will occur in rapid succession to catch up. In the long run, the frequency of execution will be exactly the reciprocal of the specified period (assuming the system clock underlying Object.wait(long) is accurate).

  • Fixed-Delay: A fixed-delay execution means that each execution is scheduled relative to the actual time of the previous execution. If an execution is delayed for any reason (such as garbage collection or other background activity), subsequent executions will be delayed as well. As a result, the frequency of execution will generally be slightly lower than the reciprocal of the specified period (assuming the system clock underlying Object.wait(long) is accurate).

Select True or False.

True indicates that a fixed-rate execution is used. False indicates that a fixed-delay execution is used.

Where to Go Next

TCPIP Inbound Settings - Envelope Message — TCP/IP Adapter Inbound.

Related Topics

TCPIP Inbound Settings - Envelope Message — TCP/IP Adapter Inbound

This section of the Inbound TCP/IP adapter Connectivity Map properties contains the top-level parameters is as displayed in the table.

Table 118 Connectivity Map - TCPIP Inbound Settings - Envelope Message

Name 

Description 

Required Value 

Envelope Type

Specifies the envelope type. The envelope type defines where a message starts and stops. 

Enter one of the following properties denoting the envelope type: 

  • BeginEndMarked

  • EndMarked

  • FixedLength

  • LengthPrefixed

  • MarkedAndFixed

  • PerActiveConnection

  • Custom

The default is BeginEndMarked.

BeginEndMarked is supported by the properties Bytes to Read, Ignore Until Char Value, and Store Until Char Value.

EndMarked is supported by the property Store Until Char Value.

FixedLength is supported by the properties Bytes to Read.

LengthPrefixed is supported by the property Width of Length and Numeric Representation.

MarkedAndFixed is supported by the property Bytes to Read, Ignore Until Char Value, and Store Until Value.

PerActiveConnection is supported by the property PerActiveConnection.

Custom is supported by the properties Custom Enveloped Class Name and Custom Defined Property.


Note –

For all envelope types, except MarkedAndFixed, the data is just the payload. See MarkedAndFixed for an explanation of how the data is handled by that envelope type.


Custom Enveloped Class Name

Specifies the Java class name to be used when the Envelope Type property is set to Custom.

If you are using a custom envelope you have created, using a Java Class, you can import the Java JAR file containing the class into any desired Collaboration, using the Collaboration Editor's file import feature. 

The class name should be a full qualified class name, such as com.abc.MyClass. The class must implement interfaces


com.stc.connector.tcpip.ext.msg.
EnvelopedMsgReceiver

and 


com.stc.connector.tcpip.ext.msg.
EnvelopedMsgSender

For more details, see Customized Enveloping.

A full Java class name. 

A full qualified class name, or None if Custom is not the Envelope Type.

The configured default is None.

Customer Defined Property

Used when the Envelope Type value is set to Custom. Specifies a list of user-defined parameters. You can parse this information, such as delimiters, into your customized envelope message implementation.

A text string. 

Bytes to Read

Used with the following Envelope Types: 

  • FixedLength

  • MarkedAndFixed

Specifies the number of bytes to read. It is assumed that all Events received by the adapter have the same length. 

An integer indicating the number of bytes. 

The configured default is 1.

Width of Length

Used for Envelope Type value LengthPrefixed. Specifies the width of the envelope length. In other words, it dictates the number of digits to be used to represent the length field.

An integer, the range is 1 to 10. This property must be set to 2 for Network short and 4 for Network long.

The configured default value is 1.

Numeric Representa-tion

Used for Envelope Type value LengthPrefixed. Specifies how the number representation of the prefixed length is expressed. This value is expressed in one of the following formats:

  • Decimal

  • Hexadecimal

  • Octal

  • Network Short

  • Network Long

Select one of the following: 

  • Decimal

  • Hexadecimal

  • Octal

  • Network Short

  • Network Long

The configured default is Decimal.

Ignore Until Char Value

Used for the Envelope Types BeginEndMarked and MarkedAndFixed. Specifies the value for the ignore-until (same as begin block) character. All incoming characters are ignored until this character is encountered.

A decimal ascii number. The allowed range is 1 to 127. 

The configured default is 11.

Store Until Char Value

Used for Envelope Types BeginEndMarked, EndMarked, and MarkedAndFixed. Specifies the character in the End Block or Marker position of the envelope. All incoming characters are stored until this character is encountered.

A decimal ASCII number. The allowed range is 1 to 127. 

The configured default is 12.

Where to Go Next

Java CAPS 5.1.x to 6 Upgrade Procedure.

Related Topics

Java CAPS 5.1.x to 6 Upgrade Procedure

There are new versions of the Configuration templates used in version 6. For previous 5.1.x projects that are imported or going through an "in-place upgrade" to the latest version, the Configuration template will be upgraded during design time or build time.

At design time when you open the Connectivity Map or Environment properties window, a warning window appears (as shown in the figure below), and the Configuration template automatically upgrades. You can now update the Environment properties with any necessary change, and run the project.

Figure 3 Configuration Template Warning Window

Configuration Template Warning Window

If you attempt to build a project without first opening either the Connectivity Map or Environment property window, code generation will automatically upgrade the Configuration template. Once this build-time upgrade scenario is complete, you will not see the warning window anymore.