6. Embedding Jess in a Java Application

6.1. Using the class jess.Main

The class jess.Main provides not only the Jess command-line interface, but also the backbone of the example graphical interfaces (jess.Console and jess.ConsoleApplet) as well. You can reuse jess.Main from your own applications, or (if you have a source distribution) you can simply use it as an example of what an application embedding Jess can look like. jess.Main does a number of things that a reasonable Jess application might do:

6.2. Manipulating Jess in other ways

Note that each individual jess.Rete object represents an independent reasoning engine. A single program can then include several independent engines.

Jess can be used in a multithreaded environment. The jess.Rete class internally synchronizes itself using several synchronization locks. The most important lock is a global lock on all rule LHSs: only one assert or retract may be processing in a given jess.Rete object at a time. This restriction is likely to be relaxed in the future.

Back to index