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


Chapter 3 Adapter Program Elements : Sessions

Sessions
An SDK session encapsulates transport information. To represent sessions the SDK supplies a hierarchy of classes: a parent class, MSession, and two subclasses, MRvSession and MJmsSession.
Each adapter instance can use one or more sessions. The SDK session configurations can be created and changed through TIBCO Designer. This keeps configuration separate from the running application.
When creating adapter services in TIBCO Designer, a corresponding endpoint (publisher, subscriber, etc) and session are created automatically. Figure 8 shows a default RVCM Session created when a Publication Service was instantiated. In general, you do not need to change these defaults.
Figure 8 Default Session
If multiple sessions are required for the same endpoint, select the session in the configuration’s Advanced folder in TIBCO Designer. When you save the project, the information is stored in the project repository.
In C++, timers are associated with a TIBCO Rendezvous session. In the Java SDK, they are session-independent. (There is no such thing as a JMS-based timer.)
In Java, TIBCO Rendezvous sessions can be RVA sessions. RVA sessions allow communication with the RVA daemon instead of the RVD daemon. Note that unlike RVD, the RVA daemon is not started automatically.
Sessions and TIBCO Rendezvous
When you create services and allow TIBCO Designer to auto create a session, you need not to worry about the type of session. If, however, you create an MPublisher or MSubscriber that uses TIBCO Rendezvous programmatically, ensure that the appropriate TIBCO Rendezvous session (transport) is available.
Multiple Sessions
SDK-based adapters can use multiple sessions. By default, sessions are autocreated by TIBCO Designer when creating a Publication or Subscription Service.
You can also use the Advanced folder inside the adapter configuration in TIBCO Designer to define as many sessions of each type as you need. During execution of MApp::start(), the SDK will create the corresponding instances of the appropriate MSession subclass. Custom adapters can obtain information about a session by calling the methods in the session instance.

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