Migrating context

This topic introduces how you can migrate BTT version 4.3 Context to BTT version 6.1.2 Context.

You do not need to change the context, type, and data definitions of BTT version 4.3 when you migrate them to BTT version 6.1.2, because these definitions are the same in BTT version 4.3 and BTT version 6.1.2. In BTT version 6.1.2, a class table tag for context implementation class and an initializer tag are added in the CHA configuration in the BTT XML definition file, such as the file btt.xml.

The APIs in BTT version 4.3 and BTT version 6.1.2 are almost the same except the way of constructing the context instance. In BTT version 6.1.2, the context is constructed from ContextFactory. The service reference of BTT version 4.3 is not useful in BTT version 6.1.2. An example of migrating BTT version 4.3 context to BTT version 6.1.2 context is as follows:

  1. Creating BTT version 4.3 context.
    Context ctxt = (Context) Context.readObject("myContext");
    Context ctxt2 = new com.ibm.dse.base.Context();
    ctxt2.setName("myContext2");
  2. Creating BTT version 6.1.2 context.
    Context diiTestCtx = ContextFactory.createContext("myContext");
    Context ctxt2 = new com.ibm.btt.base.Context();
    ctxt2.setName("myContext2");