Solved

Persistent Server (Corba Orb Question)

Posted on 2002-05-25
7
840 Views
Last Modified: 2008-03-10
I am trying to initialize 2 orbs within the same persistent server.  One orb communicates with a remote server and uses visibroker.  The other orb is for the persistent server for the local clients on my server.  Both are running on a UNIX platform.  Currently, I can't get both orbs initialized.  Has anyone tried this before?  If so, please let me know what I am doing wrong.  Below is a code example:

//-----------------------------------
// HelloTestServer
//-----------------------------------

import java.util.Properties;
import org.omg.CORBA.Object;
import org.omg.CORBA.ORB;
import org.omg.CosNaming.NameComponent;
import org.omg.CosNaming.NamingContextExt;
import org.omg.CosNaming.NamingContextExtHelper;
import org.omg.CORBA.Policy;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.*;
import org.omg.PortableServer.Servant;

public class HelloTestServer {

  public static void main(String args[]) {
    try{

      // set far away orb properties
      Properties p = new Properties();
      p.put("org.omg.CORBA.ORBClass", "com.inprise.vbroker.orb.ORB");
      p.put("org.omg.CORBA.ORBSingletonClass", "com.inprise.vbroker.orb.ORB");
      p.put("SVCnameroot", "FARAWAY");
      p.put("ORBagentAddr", "1.2.3.4");

      System.out.println("Set properties for far away orb ...");

      // Set local orb properties
      Properties w = new Properties();
      w.put("org.omg.CORBA.ORBInitialHost", "localhost");
      w.put("org.omg.CORBA.ORBInitialPort", "1050");

      System.out.println("Set properties for local orb ...");

      // create and initialize the ORB - Local
      ORB orb = ORB.init(args, w);

      System.out.println("Initialized local orb ...");

      // create and initialize the ORB - far away
      ORB farawayorb = ORB.init(args, p);

      System.out.println("Initialized far away orb ...");

      // Instantiate the servant
      HelloTestServant hellotestServant = new HelloTestServant(orb, farawayorb);

      System.out.println("Instantiated Local servant ...");
0
Comment
Question by:Marissa_D
  • 4
  • 3
7 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 7037453
 What is the error message you are getting?
0
 

Author Comment

by:Marissa_D
ID: 7037958
Currently, I am getting the following error:

FATAL:  application error: Exception: null
________________________________________________

However, I was getting the following before I started using the "Properties" object:

org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.inprise.vbroker.orb.ORB  vmcid: 0x0  minor code: 0  completed: No

If it helps, I got both orbs initialized and communicating with each other in a transient server.  However, I need both initialized in a persistent server.
0
 
LVL 35

Expert Comment

by:girionis
ID: 7038647
 Hmmm, firstly I have to tell you that I am not a CORBA expert. All my knwoledge about CORBA comes only from a three-months period when I was doing some in one of my previous jobs.

  With regards to your problem it seems to me that it has to do with the ORB that inprise uses by default. What I am thinking is that the VM cannot find it on startup and then it has to use the default Sun ORB, which might not be fully compliant with the vbroker's ORB.

  What I suggest you do is to make sure the vbroker's ORB is indeed in your classpath and copy your orb.properties file in your JAVA_HOME/jre/lib folder.

  Hope it helps.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Marissa_D
ID: 7043499
I just checked the Borland site and there is a compatability issue with j2sdk1.4.0 and Visibroker.  That version of Java is not supported.  Therefore, it will explain some of the problems that I have been having.
0
 
LVL 35

Accepted Solution

by:
girionis earned 300 total points
ID: 7043951
 Maybe if you use jdk1.3 it will solve the problem.
0
 

Author Comment

by:Marissa_D
ID: 7045747
I switched to a supported version of java and that fixed my problem.
0
 
LVL 35

Expert Comment

by:girionis
ID: 7061389
 Hi Marissa thank you for the points. I am glad I helped :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java 1603 Error 3 50
basic hardware to learn oop advanced design patterns 3 88
java  and programming certification ? 4 86
Windows 10 IE Certificate Issue 10 42
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now