Daniel John Debrunner wrote:

Given the drda code needs to be there for this to work, can we just move
this functionality into the drda module (and hence derbynet)?


Some code is needed in the engine to look at the property and decide if
to boot the network server. I thought DRDAServerStarter was that code,
hence it would need to be in the engine.

Or is there some way that it could be in the network server jar but
still invoked automatically when the engine boots?


AIUI DRDAServerStarter implements ModuleControl which allows it to be loaded and started based on info in modules.properties. The lifecyle is something like:
* construct service using no-arg constructor
* invoke boot()
* service initializes itself

The classname is defined in modules.properties but there is nothing that sets up a classpath so I would assume the class named needs to be available via the engine's classloader or the TCCL.

The implementation of DRDAServerStarter loads the serverClassName (hardcoded to NetworkServerControlImpl) using Class.forName() and then instantiates it and invokes it via reflection.

I think we get the equivalent behaviour by having the Monitor load the NetworkServerControlImpl directly; alternatively we could have JDBCBoot start it up explicitly.

--
Jeremy

Reply via email to