How can I run a CORBA server inside of VAJ with the IBM ORB (in the WebSphere Test Environment) using classes generated by Inprise Visibroker's idl2java compiler?

Kevin Hollenshead

This trick only works with Inprise Visibroker generated classes and works by exporting your CORBA server object as an RMI server object. Since IBM has the RMI over IIOP thing going, voila! - you have a CORBA server. Your mileage with other ORBs will vary.

*** This code requires one, albeit simple, modification to generated code (ugh!) but it works.

  1. Generate your Java classes using the idl2java compiler provided by Inprise and using the "-strict -no_bind -no_examples" options.
  2. Modify your generated TIE class (named _tie_xxxxxxx), adding "implements java.rmi.Remote"
  3. Right-click on your TIE class, select Tools => Generate RMI => RMI Stub and Skeleton.
  4. Use the following code snippet to start a CORBA server:
      // Initialize the ORB
      ORB orb = ORB.init(new String[0], null);
      // Create a server instance and a TIE instance
      MyImpl myImpl = new MyImpl();
      _tie_MyInterface myPseudoImpl = new _tie_MyInterface(myImpl);
      // Register the TIE object in a naming service or put out as an IOR
      ...code deleted...
      // Export my server object as an RMI object
      PortableRemoteObject.exportObject((java.rmi.Remote) myPseudoImpl);
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact