I am not super familiar with Rhino, but have read the docs and wanted to
sanity check on the behavior of Rhino with respect to calling native java
classes
Lets say I have a javascript fragment which refers to some native Java
classes via Packages.xxx.yyy.Foo.bar().... can anyone validate/refute the
following
1) I can compile this into a "script" using a context and a scope
2) I can execute this in a scope using a context
3) based on my optimization level, bytecode may be generated somewhere along
the way
4) I should be able to use my scope in any context
5) Each context can have an application class loader
6) Each context may have a specialized class loader for generated bytecode
I guess my question is this,
Under all circumstances do I expect the Packages.xxx to be resolved at
runtime via the application classloader of the context it is executing in,
or do any of the compilation/optimization/sharing-scopes-betwen-contexts
etc. steps mess with that.
I can certainly believe that if the bytecode compilation was to use a direct
call to xxx.yyy.Foo.bar() rather than some indirect call back via the
Context then xxx.yyy.Foo would be resolve by the generated bytecode
classloader, which is not what I'd want.
Note right now we aren't even using the generated bytecode, but would like
to, so I'd like to get the big picture ;-)
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino