There is a default rule in BTT Channels to define the data formatter and response formatter.
If you do not specify them in the request, BTT uses csRequestFormat and csReplyFormat configured in operation as data format and response format.
<QueryStockOp.xml> <operation id="QueryStockOp" context="stockCtx" implClass="com.ibm.btt.poc.opstep.QueryStockOp"> <refFormat name="csRequestFormat" refId="stockFmt" /> <refFormat name="csReplyFormat" refId="stockFmt" /> </operation> <fmtDef id="stockFmt"> <fXML dataName="stockCtxData"> <fString dataName="code" /> <fString dataName="price" /> </fXML> </fmtDef> </QueryStockOp.xml>
During migration, if you do not set the migration rules for the migration tool, the migration tool will set the BTT Version 4.3 to BTT Version 6.1.2 migration rules as the default rules.
BTT trace must be initialized at first before the applications use it. Otherwise, the default trace configuration is set and the trace configuration in btt.xml will not take effect.
If BTT is not initialized, the default trace target is WAS by using BTTLogFactoryToWASImp as the implementation class of BTTLogFactory.
When passing local mode CHA context across JVM, only the current context is serialized or deserialized. The parent and children of the current context are not serialized or deserialized. If you want to obtain the data of the parent context, you need to transfer the current context and its parent context separately.
It is recommended to generate the definition information file of the Web Service before runtime when using the Web Service DII invoker. This will improve performance and help problem determination.
ElementFactory is an implementation of IoC (Inversion of Control) Container. You can use it to apply Dependency Injection pattern in your application.
To startup your component, you must set up the configurations and dependencies of your component. Using setter injection helps you to make your configuration file as simple as possible.
You can implement initialize() method in your component. In this method, you can check the configurations and dependencies and you can also allocate required resources in this method.
You can implement com.ibm.btt.element.LifeCycle interface to enable lifecycle support. Or you can define InitMethod="destroy" in the XML definition to enable lifecycle support for your element. The benefit of implementing the LifeCycle interface is that the ElementFactory will call init() and destroy() method. As a result, you do not need to add the InitMethod="initialize" DestroyMethod="destroy" definition and your services or components will import BTT classes.
After your component starts up, you can call the business logic in your component. Do not name the business logic methods after get** and set**, because get** and set** are used in startup phase.
Destroy all the allocated resources in the destroy() method.
Choose stateless style whenever you can.
Singleton is only applicable to stateless style.