Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / CORBA / November 2003

Tip: Looking for answers? Try searching our database.

Net Beans IDE + ORB

Thread view: 
Jarosław Staszak - 13 Nov 2003 22:37 GMT
Hallo

Do u know how to start orb server under IDE?

I run my program in commandline in this way:
jre\bin\java -classpath classes;jars\parlay3gpp.jar;security.jar
com.ericsson.wda.common.Main -ORBInitialPort 1500 -ORBInitialHost 127.0.0.1

But if I try do this using my IDE ORB doesnt start. I send proper arguments:

In window Build/Set Arguments...) I put:

"ORBInitialPort 1500" "ORBInitialHost 127.0.0.1"

What schould I do to run my ORB?
Niclas Eklund - 14 Nov 2003 09:43 GMT
Hello!

You cannot use ORBInitialHost / ORBInitialPort to specify some ORB's
naming service, since it's a mechanism only supported by, to my
knowledge, omniORB, JavaIDL and Orber. Requires support for the
alternative INS (Interoperable Naming Service) that wasn't chosen.

Perhaps this link can help you:

http://members.tripod.com/ChannuKambalyal/CompareCorbaProducts.html

Cheers,

Nick

Jaroslaw Staszak wrote:
> Hallo
>
[quoted text clipped - 12 lines]
>
> What schould I do to run my ORB?
Rob Ratcliff - 22 Nov 2003 19:40 GMT
Jaroslaw,

Assuming that you have a naming service running  from the command line like:
orbd -ORBInitialPort 1050 -ORBInitialHost yourHostname

You should be able to specify the  parameters:

-ORBInitialHost yourhost -ORBInitialPort 1050

in the Properties/Execution/Arguments field corresponding to your
program from within
NetBeans. (Just right click on the program node in the "Explorer" tree
to locate
the Properties dialog.) Also, make sure all your jar files are mounted
in the Explorer.
(Do you have an error message from your run?)

Here's a sample program that worked fine for me from within NetBeans
using JDK 1.4.2:

import java.util.Properties;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Object;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextExtHelper;

public class Test {
 
   public static void main(String[] args) {
     
       try {
         
           Properties props = System.getProperties();
           //props.put("org.omg.CORBA.ORBInitialPort","1050");
           //props.put("org.omg.CORBA.ORBInitialHost","yourhost");
           final ORB orb = ORB.init(args,props);
         
           String[] services = orb.list_initial_services();
           for (int i = 0; i < services.length; i++) {
               System.out.println(services[i]);
           }
         
           Object obj =
           
//orb.string_to_object("corbaloc:iiop:yourhost:1050/NameService");
           
//orb.string_to_object("corbaloc:iiop:1.0@yourMicoHost:9001/NameService");
// locate Mico NameService
           orb.resolve_initial_references("NameService");
           System.out.println(" naming object = " + obj);
         
           if (obj != null ) {
               NamingContext rootContext =
NamingContextExtHelper.narrow(obj);
               System.out.println(" naming object = " + rootContext);
               System.out.println(rootContext._non_existent());
           }
         
       } catch (Exception ex) {
           ex.printStackTrace();
       }
   }
}

> Jaroslaw Staszak wrote:
>
[quoted text clipped - 15 lines]
>>
>> What schould I do to run my ORB?
Rob Ratcliff - 22 Nov 2003 19:45 GMT
Jaroslaw,

Assuming that you have a naming service running  from the command line like:
orbd -ORBInitialPort 1050 -ORBInitialHost yourHostname

You should be able to specify the  parameters:

-ORBInitialHost yourhost -ORBInitialPort 1050

in the Properties/Execution/Arguments field corresponding to your
program from within
NetBeans. (Just right click on the program node in the "Explorer" tree
to locate
the Properties dialog.) Also, make sure all your jar files are mounted
in the Explorer.
(Do you have an error message from your run?)

Here's a sample program that worked fine for me from within NetBeans
using JDK 1.4.2:

import java.util.Properties;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Object;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextExtHelper;

public class Test {

   public static void main(String[] args) {

       try {

           Properties props = System.getProperties();
           //props.put("org.omg.CORBA.ORBInitialPort","1050");
           //props.put("org.omg.CORBA.ORBInitialHost","yourhost");
           final ORB orb = ORB.init(args,props);

           String[] services = orb.list_initial_services();
           for (int i = 0; i < services.length; i++) {
               System.out.println(services[i]);
           }

           Object obj =

//orb.string_to_object("corbaloc:iiop:yourhost:1050/NameService");

//orb.string_to_object("corbaloc:iiop:1.0@yourMicoHost:9001/NameService");
// locate Mico NameService
           orb.resolve_initial_references("NameService");
           System.out.println(" naming object = " + obj);

           if (obj != null ) {
               NamingContext rootContext =
NamingContextExtHelper.narrow(obj);
               System.out.println(" naming object = " + rootContext);
               System.out.println(rootContext._non_existent());
           }

       } catch (Exception ex) {
           ex.printStackTrace();
       }
   }
}

> Jaroslaw Staszak wrote:
>
[quoted text clipped - 15 lines]
>>
>> What schould I do to run my ORB?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.