×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Connecting Visibroker C++ to Standard Java ORB Implementation

Connecting Visibroker C++ to Standard Java ORB Implementation

Connecting Visibroker C++ to Standard Java ORB Implementation

(OP)
I am really in need of some help here!  I have Visibroker for C++ running on HP-UX.  I have a java client attempt to connect to the server using the standard Java ORB implementation with the following code:
<B>Properties props = new Properties();
    props.put("org.omg.CORBA.ORBClass", "com.sun.corba.se.internal.iiop.ORB");
    props.put("org.omg.CORBA.ORBSingletonClass", "com.sun.corba.se.internal.iiop.ORB");
    props.put("ORBInitialHost", "10.80.62.30");
    props.put("ORBInitialPort", "140015");
    org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init((String[])null, props);
    org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
</B>

An exception is thrown when I hit this line:
<B>    org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
</B>

The exception is:
org.omg.CORBA.COMM_FAILURE:   minor code: 1398079490  completed: No
at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(IIOPConnection.java:919)
at com.sun.corba.se.internal.iiop.IIOPConnection.send(IIOPConnection.java:980)

Has anyone been able to connect the standard Java ORB Implementation with Visibroker for C++?

Can anyone provide any examples of what the process is to do so?

Any help would be greatly appreciated!

RE: Connecting Visibroker C++ to Standard Java ORB Implementation

hai,
iam too facing the same prob.do let me know the way if u have solved the problem,
bye
lake

RE: Connecting Visibroker C++ to Standard Java ORB Implementation

//Visibroker Test Stub (idl2java)
import ksc_objects_vb.*;
import java.io.*;
import org.omg.CosNaming.*;

public class nvb_testStub
{
  public static void main(String args[])
  {
    try {
    org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null);

    String filename = "ns.ior";
    FileInputStream fis = new FileInputStream(filename);
    DataInputStream dis = new DataInputStream(fis);
    String ior = dis.readLine();

    org.omg.CORBA.Object rootObj = orb.string_to_object(ior);

    NamingContextExt root = NamingContextExtHelper.narrow(rootObj);
    NameComponent nc = new NameComponent("arborManager", "");
    NameComponent[] n = {nc};
    org.omg.CORBA.Object obj = ((NamingContext)root).resolve(n);

    Arbor arbor = ArborHelper.narrow(obj);
    long cnt = arbor.getCount();

    System.out.println(cnt);
    
    } catch(Exception e) {
        System.out.println("STUPID Error : " + e);
        e.printStackTrace(System.out);
    }
  }
}


too little too late most likely but here is a working example... Hope this helps

RE: Connecting Visibroker C++ to Standard Java ORB Implementation

does it work for you guys ??

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close