Menu

#93 Exception running 2+ engines

v_0_8_7
open
5
2002-11-21
2002-11-21
No

I'm using the sntool externally in my java application.
My application interacts with sntool with the class
EngineFacade. I put objects in places and remove them
by getting a reference to the place with
getEngine().getRootPage().getPlaces(), and then using
putObject and removeObject methods.

When I run just on engine, everything works fine
putting and removing objects. But when I start more
than one, I get the following error:

ontool.engine.EngineException: invalid class model in
place type Stimulus : Stimulus
at ontool.engine.Place.putObject(Place.java:100)

(Stimulus is the name of a class type of a place of my
network)

Going thru the SNTool source, I found that there's a
test in Place.java like this

if \(obj.\_\_getModel\(\) \!= getModel\(\).getGenericType\(\)\)
        throw new EngineException\(

and the obj.__getModel() gets a reference for the model
from the current running engine, but since I started
two of them, it gets to the last started one. So I
cannot put objects into the first started engine.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB