Try OpenEdge Now
skip to main content
BPM Events User's Guide
Accessing Java objects and EJB components : Mixing two separate instance of a class
 

Mixing two separate instance of a class

When a JAR file is stored in an application folder, say app\lib\some.jar, the scope of a class accessed from BPM Events code of application app is limited to that application. For example, if there is a JAR file, app1\lib\some.jar, then a class A included in some.jar is instantiated in a classloader for app and app1 respectively.
Although a Java object app cannot access BPM Events’s Java binding features, it is still possible to get an object allocated by app1 through global variable, or by a function defined in BPM Events module in app1. In this case, there is a possibility of mixing two instances of the ‘same’ class A.
In general, it is not a good practice to import an application using another instance of the class.