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


Chapter 12 Creating a Deployable Custom Adapter : Adding the Adapter to the Domain

Adding the Adapter to the Domain
To deploy the custom adapter:
Creating an Alias Library in TIBCO Designer
You can include the external files in the EAR by creating an Alias Library. For detailed steps, refer to TIBCO Designer’s User’s Guide.
To bundle an Alias Library:
1.
2.
3.
In the TIBCO Designer Preferences dialog, click the File Aliases tab and create aliases for the external files.
4.
Add an AliasLibrary and include these external files in the Aliases tab, check Deploy?, and click Apply.
5.
Select Shared Archive and add this AliasLibrary to the Resources tab.
Creating EAR File in TIBCO Designer
To deploy a project, you must generate an Enterprise Archive for it. Before creating an Enterprise Archive (EAR) file, in Designer, you must convert the existing AE .dat file to multi-file format, and open the multi-file project.
 
Task A Convert the Existing File
To convert the existing example .dat file:
1.
2.
Click Convert DAT to Files.
3.
a.
In the DAT File field, click Browse and navigate to SDK_HOME\resourcekit\deployableAdapter\zap_compliant.dat.
b.
In the Project Directory field, type install-path\tibco\tra\version_num\resourcekit\sdk\deployableAdapter\zapadapter_multifiles.
c.
Click OK. TIBCO Designer converts the .dat file to a multi-file project.
The name of the .dat file cannot be used as the name of the directory.
4.
Click the Project tab and choose Open Existing Project.
5.
In the Open Project dialog, click the Multi-File Project tab, browse to select the project directory SDK_HOME\resourcekit\deployableAdapter\zapadapter_multifiles.
6.
Task B Build an Enterprise Archive
To build the archive:
1.
2.
In the Palettes panel, click the General palette, and then drag an Enterprise Archive into the Design panel.
3.
4.
In the Project panel, expand zapadapter, select Shared Archive.
5.
Click the Resources tab. Browse and add the AliasLibrary that was created earlier as explained in Creating an Alias Library in TIBCO Designer.
6.
a.
In the Project panel, select the zapadapter enterprise archive. In the Palettes panel, select an Adapter Archive (Adapter Resources palette) and drag it into the Design panel.
b.
In the Configuration panel, click the Browse Resources icon next to the Adapter field, select the resource from the pop-up, and click Apply.
Figure 38 Add an Adapter Archive
c.
Click the Advanced tab, specify Software Type as adzap. Click Apply.
7.
8.
In the Project panel, select the zapadapter enterprise archive. Enter the following in the File Location field: SDK_HOME\resourcekit\deployableAdapter\zapadapter.ear.
9.
Click Build Archive.
Now, the archive file is ready for deployment.
Adding the ZapAdapter to the TIBCO Administrator Domain
Custom software such as adapters built using the TIBCO Adapter SDK, must be added manually before you can deploy the application.
To add the ZapAdapter software to a TIBCO Administrator domain:
1.
2.
Select the Installed Software console of TIBCO Administrator.
3.
Click Add Custom Software.
4.
5.
Name of the machine on which the software is to be added. Click Change to add the software on a different machine.
6.
Click Save.
Creating the ZapAdapter Application in the TIBCO Administrator Domain
1.
2.
Click the Application Management module and click New Folder. In the window that displays, type SDK Adapters in the Name field. Click Save.
3.
4.
Click Browse, select the zapadater Enterprise Archive file created in the first step.
Make sure that an adapter is available as the Target in the bottom right corner. If it isn’t, register it first. See Adding the ZapAdapter to the TIBCO Administrator Domain for more information.
Figure 39 Create New Application
5.
The next dialog displays the Configuration console with Configuration Builder on the left and the Deployed Configuration pane on the right. The Deployed Configuration pane is empty because the application has not yet been deployed.
Figure 40 Configuration Console
6.
Click Deploy.
For instructions on how to deploy an adapter, see the TIBCO Administrator’s Guide.
Deploying, Starting, and Stopping the Adapter
Once the adapter has been added to the domain and deployed, it can be started or stopped using the TIBCO Administrator.
Administrator calls the class Hawk microagent to stop a deployed adapter that is independent of the stop() method, which is called by the wrapper when it was run as an NT service. On UNIX, there is no NT service, so the stop() method that is used to update NT service status is irrelevant. In other words, a wrapper-enabled and deployed adapter has two ways of running and terminating on Windows:
For additional information, see the TIBCO Administrator’s Guide.
Running the Example
If the domain registration and deployment are successful, the adapter can be launched from TIBCO Administrator.
In the Designer window, run the zapsubscriber process to receive any messages published.
In a separate command window, launch tibrvlisten zap.out.
Expected Results
You should see the output in the tibrvlisten window.

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