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 / General / December 2006

Tip: Looking for answers? Try searching our database.

about jacob and jdk's corba implmentation

Thread view: 
david wolf - 28 Nov 2006 22:57 GMT
Hi All,

I am using java to connect to a CORBA Service. I used to use jdk's
corba implementation to connect to the service. Now I swithed to
Jacorb. Since Jacor and JDK both have corba implementation, when I use
ant to compile my code, how to make sure my code actually use JACORB's
implementation instead of JDK's (I checked, the classes related to
corba in both implementation has the same fully qualified class names).

I quoted a piece of code from my ant build.xml. I put jacorb's lib in
the front, while java's lib (that is, ${myjava.home}/lib) later. Will
this do what I want?

<path id="compile.classpath">
        <fileset dir ="${jacorb.home}/lib">
                            <include name="*.jar"/>
        </fileset>

        <fileset dir ="${tomcat.home}/shared/lib">
            <include name="*.jar"/>
        </fileset>

        <fileset dir ="${myjava.home}/lib">
                    <include name="*.jar"/>
        </fileset>       
</path>

Thanks,

David
Andreas Wollschlaeger - 28 Nov 2006 23:29 GMT
> Hi All,
>
[quoted text clipped - 8 lines]
> the front, while java's lib (that is, ${myjava.home}/lib) later. Will
> this do what I want?

Usually, your code would use the classes under org.OMG.... , coming with
the SDK. The actual ORB implementation is then chosen at *runtime*,
defined by the java properties org.omg.CORBA.ORBClass and
org.omg.CORBA.ORBSingletonClass (see docs for org.omg.CORBA.ORB)
If jacorb really comes with the org.OMG.** classes packed inside, i'd
consider this as a misfeature :-(

You might verify the correct use of jacorb by issuing some

  System.out.println(myOrb.getClass().getName())

on your ORB instance, just to sure...

HTH
Andreas
david wolf - 01 Dec 2006 17:06 GMT
Hi Andreas,

Thanks for your reply. JDK and Jacorb do have the same qualified class
names starting with org.omg. See following for details.

C:\jdk1.5\jre\lib>jar tvf rt.jar|grep "org/omg/CORBA/ORB"|more
  439 Wed May 03 02:00:12 CDT 2006
com/sun/corba/se/org/omg/CORBA/ORB.class
  582 Wed May 03 01:29:06 CDT 2006 org/omg/CORBA/ORB$1.class
 1469 Wed May 03 01:29:06 CDT 2006 org/omg/CORBA/ORB$2.class
 8226 Wed May 03 01:29:06 CDT 2006 org/omg/CORBA/ORB.class
  336 Wed May 03 01:29:06 CDT 2006
org/omg/CORBA/ORBPackage/InconsistentTypeCod
e.class
  318 Wed May 03 01:29:06 CDT 2006
org/omg/CORBA/ORBPackage/InvalidName.class

C:\JacORB_2.3.0_beta2\lib>jar tvf jacorb.jar|grep "org/omg/CORBA/ORB"
    0 Sat Oct 14 21:45:40 CDT 2006 org/omg/CORBA/ORBPackage/
 6024 Sat Oct 14 21:47:34 CDT 2006 org/omg/CORBA/ORB.class
  424 Sat Oct 14 21:45:38 CDT 2006
org/omg/CORBA/ORBPackage/InconsistentTypeCod
e.class
 2006 Sat Oct 14 21:45:38 CDT 2006
org/omg/CORBA/ORBPackage/InconsistentTypeCod
eHelper.class
  397 Sat Oct 14 21:47:34 CDT 2006
org/omg/CORBA/ORBPackage/InvalidName.class
 1925 Sat Oct 14 21:45:30 CDT 2006
org/omg/CORBA/ORBPackage/InvalidNameHelper.c
lass

I use what you suggested
"System.out.println(myOrb.getClass().getName())", I printed following
info:

11:03:07,978 INFO  [STDOUT] com.sun.corba.se.impl.orb.ORBImpl

So I guess I am using sun's implementation. How to switch to Jacorb's
library ? Like I tried before in ant's setting, I am not sure how to
use jacorb's lib since both JDK and jacorb have the same fully
qualified class name.

Thanks,

David

> > Hi All,
> >
[quoted text clipped - 24 lines]
> HTH
> Andreas
david wolf - 01 Dec 2006 17:24 GMT
I found the answer for my own problem.

Here is the answer link I found on the web:
http://www.theaceorb.com/faq/index.html#070

David

> Hi Andreas,
>
[quoted text clipped - 71 lines]
> > HTH
> > Andreas


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



©2009 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.