Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Server with vbj and Client with jdk

Status
Not open for further replies.

johnnyku

Programmer
Jul 29, 2001
2
0
0
HK
I am new to CORBA and now using VisiBroker for Java 4.5.1.
I have implemented a simple echo Server and Client, and they can running properly with vbj.exe.
However, my manager wants me running the server with vbj.exe while running the client with jdk 1.2.2. I have tried to do so, but obtaining the following error:
===== Quote =====
prompt> java -cp vbjorb.jar;vbjdev.jar;. Client
Exception in thread "main" org.omg.CORBA.BAD_PARAM: minor code: 0 completed:
No
at EchoSample.EchoServerHelper.bind(EchoServerHelper.java:55)
at EchoSample.EchoServerHelper.bind(EchoServerHelper.java:47)
at Client.main(Client.java:11)
===== End of Quote =====
The way that I try to bind the connection from the Client is as follows:
===== Quote =====
// Initialize the ORB.
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null);
// Locate an echo server.
EchoSample.EchoServer echoServer = EchoSample.EchoServerHelper.bind(orb, "EchoServer");
===== End of Quote =====

Could anyone give me any hint what goes wrong? Or is it not possible without using the vbj.exe for running the Client program?

Thanks in advance.
 
Just find out the solution and post it here...
Before calling the org.omg.CORBA.ORB.init() method, some properties are being set. Below is the extraction:
===== Quote =====
Properties props = new Properties();
props.put("org.omg.CORBA.ORBClass", "com.inprise.vbroker.orb.ORB");
props.put("org.omg.CORBA.ORBSingletonClass", "com.inprise.vbroker.orb.ORB");
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props);
===== End of Quote =====
After added the above codes, the Client can connect and communicate to the server like using vbj.exe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top