RE: [Evolution-hackers] RE: Java and Bonobo communication via CORBA



Michael,

Thanks for your help!  I've managed to get access to the components I want
via Bonobo.  I wasn't putting two and two together in terms of what the OAF
activation-client was expecting.  For anyone else who might be searching for
a similar answer, or possibly in case I still am not doing it the
'recommended' way, here is what I ended up doing:

activation-client -s
"repo_ids.has('IDL:GNOME/Evolution/Calendar/CalFactory:1.0')".
Which, in this example, is the Evolution Wombat Calendar Factory

the repo_ids attribute is defined in the .oaf files found within the source
of each project, in this case GNOME_Evolution_Wombat.oaf

	<oaf_attribute name="repo_ids" type="stringv">
		<item value="IDL:GNOME/Evolution/Calendar/CalFactory:1.0"/>
		<item value="IDL:Bonobo/Unknown:1.0"/>
	</oaf_attribute>

Also, in order to obtain valid IORs for Java via this method (i.e. Ones that
do not reference a local socket), you may also have to create a /etc/orbitrc
file containing:
ORBIIOPIPv4=1
#ORBIIOPIPName=[optional hostname to use]

To check that the IOR generated via the activation-client is valid for Java,
use the 'ior-decode' application included with the Bonobo packages and
ensure that a section like the following shows up:

Profile type: TAG_INTERNET_IOP
Object endian: Little
IIOP version: 1.2
Host: [hostname]
Port: 2002
Object key: "....B..D......U-...'.....).."

It also may be helpful to use the Xerox/Parc provided IOR Parser, although
due to some codeset differences you may encounter mixed results:
http://www2.parc.com/istl/projects/ILU/parseIOR/

I ended up being able to successfully use both JDK 1.3.1 and JDK 1.4.1 to
access the components I wanted.  Simply ORB.init().  I also successfully
used Jacorb and OpenORB to access the components.

The Monkeybeans2 project in CVS has an example of activating Bonobo
components with Java.  The jump for me was understanding what exactly the
activation-client was expecting.

Accessing the ActivationContext interfaces directly is a no-no, and hangs
due to Context object interoperability (or possibly context contents).  This
was the way I had hoped to do it to prevent the forking and dependence on
the path to the activation-client being setup properly, but there does not
appear to be any way around it.  I've just added code to check it's
existence in the script to start the app.

Anyway, just thought I'd share so that hopefully others won't have to bang
their heads on the wall (at least not quite as much :)  ) as I did.

Cheers.

-Patrick

-----Original Message-----
From: evolution-hackers-admin lists ximian com
[mailto:evolution-hackers-admin lists ximian com]On Behalf Of Michael
Meeks
Sent: Tuesday, June 24, 2003 4:52 AM
To: Patrick Gerzanics
Cc: gnome-devel-list gnome org; evolution
Subject: [Evolution-hackers] RE: Java and Bonobo communication via CORBA


Hi Patrick,

On Fri, 2003-06-20 at 17:48, Patrick Gerzanics wrote:
> An example as to what to give the activation-client to activate say the
PCS
> would be really useful.

	I believe you want to activate
OAFIID:GNOME_Evolution_Wombat_CalendarFactory. The best place for these
questions though is on the evolution hackers list.

	HTH,

		Michael.

--
 michael ximian com  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
evolution-hackers maillist  -  evolution-hackers lists ximian com
http://lists.ximian.com/mailman/listinfo/evolution-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]