HI

When I use Rhino JS shell to execute the following code,

        Main m = new Main();  // rhino js shell main function
        String argsServer[] = {"interpreterRun.js",
"addTags_coordinatorScript.js"};
        m.main(argsServer);  *// 1*
        System.out.println("----------------------------------");
        Main m2 = new Main();
        String argsServer2[] = {"interpreterRun.js",
"addTags_coordinatorScript.js"};
        m.main(argsServer);  *// 2*

the execution result  for 1 is totally correct
s_checkTagsWF
s_checkIsExistingWF
s_storeTagsDBWF
----------------------------------

the execution result  for 2 is wrong because everything has been executed
twice!
s_checkTagsWF
s_checkIsExistingWF
s_storeTagsDBWF
s_checkTagsWF
s_checkIsExistingWF
s_storeTagsDBWF

if I call m.main(argsServer) 3 times, the execution result is as  following
s_checkTagsWF
s_checkIsExistingWF
s_storeTagsDBWF
s_checkTagsWF
s_checkIsExistingWF
s_storeTagsDBWF
s_checkTagsWF
s_checkIsExistingWF
s_storeTagsDBWF

Can anyone give me some clues about why this happens? Are there any contexts
which I should clean before I call the js shell main function again?

Cheers
Peng
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to