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


Chapter 5 Object Sharing Between Java Activities and Advice Implementation : API's and New Interfaces

API's and New Interfaces
The following interface has been added in the TIBCO ActiveMatrix BusinessWorks:
public interface JavaProcessContext
The public methods available in this interface are:
public void storeProcessObject (String key, Serializable obj)
public Serializable getProcessObject (String key)
public Serializable removeProcessObject (String key)
Implement a setJavaProcessContext (JavaProcessContext object) in the Java class in which you wish to use the feature. The engine will invoke this method before any other methods are invoked on the JAVA class.
Advice Implementation developers need not use this interface for storing and retrieving objects. They should continue to use similar methods defined on the AspectProcessContext interface.
Use Cases
There are two cases that happen while retrieving:
If an advice is trying to retrieve an object with the unique-key foo, the engine first looks up if an advice which has been executed for the same process earlier has checked-in an object with key foo. If it does not find an object, the engine then looks up if an activity has checked-in an object with key foo. If the engine does not find an object in both cases, it returns a NULL.
Similarly, if an activity tries to retrieve an object with the unique-key foo, the engine first looks up if an activity which has been executed in the same process earlier has checked-in an object with key foo. If it does not find an object, the engine then looks up if an advice has checked-in an object with key foo. If the engine does not find an object in both cases, it returns a NULL.
 
 
 
 

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