CORBA: Java's servertool does not allow me to register a server class
-
20-09-2019 - |
Question
Have been pulled down into the realm of CORBA...
I am trying to quickly learn (if not master...) CORBA along side its Java mappings. I have come upon some old tutorials:
Java IDL: The "Hello World" Example
orbd - The Object Request Broker Daemon
I have created a project with the source from the first link above (Java IDL...) and have run both HelloServer and HelloClient after running the following command:
start orbd -ORBInitialPort 1050
Not surprisingly, everything works :)
I then with to register the HelloServer in the as a persistent service and fail miserably!
I run the following command (launched from the "bin" folder (that which contains the .class files)):
%JAVA_HOME%\bin\servertool -ORBInitialPort 1050
I then run:
servertool > register -server HelloServer -classpath .
and the process simply hangs...
What might I be doing wrong
Solution
Well I am not sure why things have started to work but...
From the "bin" folder (that which contains the .class files) I have run:
%JAVA_HOME%\bin\orbd -ORBInitialPort 1050
Then opened a new cmd shell (from the same location) - since the previous one is running the orbd and have run:
%JAVA_HOME%\bin\servertool -ORBInitialPort 1050
Both:
register -server HelloServer -classpath . -applicationName HelloServerApName
and
register -server HelloServer -classpath .
work
OTHER TIPS
Does HelloServer know where (port and machine name) to find the Naming Service?
If not, this link might help: orbd - The Object Request Broker Daemon (ORBD).