Module added via addScriptModule not visible in Jython

I register a script module specifying location “xasClassA”.
The module loads without incident at restart of the gateway.
In the Designer scripting console, this line:
import xasClassA
results in this error message:
Import Error: No module named xasClassA

This is the code in the module:
@Override
public void initializeScriptManager(ScriptManager oScriptManager)
{
oScriptManager.addScriptModule(“xasClassA”, new MyClassA());
}

This is partially solved. I’ll show the partial solution here and open a new topic for the remaining issue.

The Script Console in the Designer executes the script in the Designer scope.
I added the script module in the gateway hook, because it will be a gateway script.
I was attempting to use the script module in Script Console.
Adding the script module in the designer hook class makes the class visible in Script Console.

I was only able to make this work if the namespace is a subset of system.
oScriptManager.addScriptModule(“system.xasClassA”, MyClassA);

Note to technical writer:
It took me quite a while to realize that the class name in the module code is not visible at all in the script environment. The namespace/location parameter is effectively the class name.

I was thinking that one location could hold multiple classes, addressed as: location.class. Not true.

Note to gateway system programmer:
Seems odd that when a second class is added to an existing namespace the script manager would merge the classes, instead of writing the second one over the first, or ignoring the second, with a warning.