Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Adapter Instance Options : Overview

Overview
Please read the following sections before starting to configure an adapter.
Configuration Tasks
Use the following sequence to create and configure an adapter.
1.
Start TIBCO Designer and open a multi-file project. See the TIBCO Designer documentation for details.
2.
Drag and drop the KenanAdapterConfiguration icon from the palettes panel to the design panel. This creates an adapter instance named, by default, KenanAdapterConfiguration.
3.
4.
Add one or more request-response services to the adapter instance by dragging and dropping the Request-RespondService icon from the palettes panel to the design panel.
5.
6.
After configuring the adapter, create the runtime adapter property file and add the project name and adapter instance name.
Multithreading
The adapter will implement multithreading using TIBCO Adapter SDK's MDispatcher class. A fixed number of threads will be created by the MDispatcher class. The number of threads can be specified at design time in the Multithreading Tab of the adapter instance.
Since multithreading is implemented at the session level, you have to specify the number of threads for each session. A group of services can be multithreaded under the same session.
When the adapter starts up, a session object is created for each session configured under the instance. If the thread count set for the session is more than 0, an equal number of dispatcher objects will be created for that session to dispatch events. If the thread count has not been configured, the default TIBCO Adapter SDK thread will dispatch the events for all sessions.
The adapter does not maintain a connection pool because this is done by the end application itself. Each thread maintains and reuses its own connection object. The connections are refreshed whenever the target application goes down. Each time a request is received, the connection object is used to execute the API call.
Connection Management
This section explains the connection management process of the adapter and its reconnection mechanism.
Reconnection Mechanism
After each request has been processed by the adapter, the request-response service checks for any errors due to the following reasons:
If a connection error occurs, the adapter attempts to reconnect to the system for a fixed number of times with a fixed time difference between each retry. These parameters can be configured in the Run-time Connection Tab at design time.
The state of the application (up or down) is checked using the response from the Kenan/BP application. The error message is extracted from the response, based on where the connection retry mechanism is originated.
There is a limitation in the Kenan/BP client libraries where after a Tuxedo service reboot, the used connections can not be reused anymore. As a result, the number of valid connections in the pool decrease and the adapter cannot refresh a connection after the server stops working and is brought back up.
Shutting down the adapter can be delayed by increasing the number of connections in the pools.properties file and by using fewer threads (proportional to the connection pool size). For example, if the number of threads configured in the adapter is 4 and the connection pool size is 40, the adapter can perform 10 reconnection attempts successfully. The connection pool size can be set using the PoolableATMI parameter in the pools.properties configuration file. Refer to the Kenan/BP System Administration Guide for details.
Saving the Project
Configuration information for an adapter and all other parameter settings related to the adapter are saved as a project. At any time while configuring the adapter, you can save the associated project. Each time you save a project, any configuration information you have entered is saved as a project.
For detailed steps and more information about exporting or importing projects to different formats (such as .dat), see the TIBCO Designer documentation.
Testing the Adapter
You can use the Adapter Tester to verify that an adapter instance is configured correctly. The tester is invoked from the TIBCO Designer Tools menu and is documented in the TIBCO Designer documentation.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved