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


Appendix A SDK Programming Guidelines : General SDK Best Practices

General SDK Best Practices
This section gives some general Adapter SDK programming guidelines.
After a custom adapter has called MApp.stop(), it can no longer access any of the objects that the class library itself created because MApp performs internal clean-up while executing the stop() method.
Using direct calls makes the custom adapter less portable and more difficult to upgrade to newer versions of the SDK. However, in some cases using a direct call to a TIBCO Rendezvous API is the only workaround available. For example, an adapter design may rely on a TIBCO Rendezvous feature not available in the SDK API, such as RV message queue control or RVFT protocol.
For example, you may want to have different properties files for starting the adapter in different modes. You can also obfuscate the properties file, which can make user names and passwords inaccessible. See Properties Files.
TIBCO Rendezvous RVCM allows you to confirm message out of sequence. This means you can confirm messages in any order such as 2, 3, 7, 5, then 6. This feature is often confused with selective confirmation, that is, confirming only certain messages.
Assume you want to confirm message 1, 3 and 5 while leaving message 2 and 4 unconfirmed. Selective confirmation is not possible using the RVCM protocol. While you can confirm individual messages without implicitly confirming any unconfirmed gaps in the sequence, the listening CM transport holds the confirmation protocol message until all gaps are filled.
For example, confirming message 57 does not implicitly confirm messages 55 and 56. Instead, the listening CM transport records the confirmation, but does not send it back to the sending transport until the program fills the gap by confirming messages 55 and 56, and then the listening transport sends the confirmations for messages 55 through 57.
TIBCO Adapter SDK supports flexible transport parameters by keeping the adapter configuration, saved in the project repository, separate from the code. See Changing Endpoint Quality of Service.
Do not access MTree instances directly.
Instead of working with MTree instances, hand them to the deserializer. TIBCO Adapter SDK validates all deserialized ActiveEnterprise messages against metadata schema defined in the repository.
While it is possible to define properties from each group in one file, how the properties are used differs. See Two Types of Properties.
While constructors exist for SDK classes, it is better to define endpoints, sessions, etc. as part of the configuration.

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