[omniORB] Implementation Repository

ondrej at frcatel.fri.utc.sk ondrej at frcatel.fri.utc.sk
Tue Mar 9 08:01:46 GMT 2004


> On Wednesday 3 March, ondrej at frcatel.fri.utc.sk wrote:
>
>> > Would it be possible to create/write an Implementation Repository
>> written
>> > in
>> > Python for omniORBpy or does it have to be c++?
>>
>> I work on implementation repository for omniORB and I worry that it's
>> not possible (at this time) to write it in Python because you need to
>> access some omniORB internals to do IOR magic. Since I did not a deeper
>> inspect on omniORBpy I can't tell you for sure.
>>
>> Maybe Duncan will open our eyes ... :-)
>
> Maybe I will. But probably not in this email.
>
> What do you need to do that you can't do from Python?  I'd suggest
> writing as much of the code as possible in Python, since it's so much
> easier to do the kinds of things an ImR needs to do from Python than
> C++. If there are any things that need C++, they should either be
> added to omniORBpy or put in a separate extension module.
>

The thing I am not able to do from Python is to create a sevant, which
will serve ALL requests on its POA and is able to extract information such
as hostname/IP, port, typeId and POA name (since these are relevant fields
for me at this time to get ImR working) from the reference. I do this
using DSI in C++. I found in Python mapping for CORBA, that Python class
PortableServer.DynamicImplementation (which I use from C++) should be
implemented, but I can't find it in omniORBpy. I've been already thinking
about adding it to omniORBpy, but I've never wrote a python extension so
far, so it could take a serious amount of time.

Maybe it could be done with interceptors, but I've never tried it. Duncan,
should THAT be the way ?

			Ondrej

#ifndef APPLICATION_MONITOR_FORWARDER
#define APPLICATION_MONITOR_FORWARDER

#include <omniORB4/CORBA.h>
#include <omniORB4/callDescriptor.h>
#include <omniORB4/internal/dynamicImplementation.h>
#include <omniORB4/internal/localIdentity.h>

#include "structures.hh"

class Forwarder :
	public PortableServer::DynamicImplementation,
	public PortableServer::RefCountServantBase
{
	protected:
		S_Admin& pd_Admin;
	public:
		Forwarder(S_Admin& admin);
		~Forwarder();

		virtual void invoke(CORBA::ServerRequest_ptr);
		virtual char* _primary_interface(
			const PortableServer::ObjectId&,
			PortableServer::POA_ptr
		);
		virtual CORBA::Boolean _is_a(const char* repoId);
};

#endif




More information about the omniORB-list mailing list