[omniORB] Publish object ref only to specified giops

Duncan Grisby duncan at grisby.org
Tue Jun 1 13:57:44 BST 2010


On Wed, 2010-05-26 at 20:04 +0400, Konstantin Olkhovskiy wrote:

> Is it possible to publish some object references to specified giop?
> For example, i have ObjectA and ObjectB and server is listening on ssl
> and unix sockets, and i want to publish ObjectA both to ssl and unix
> but ObjectB must be acces only using unix.

There's no way to ask omniORB itself to do it, but you can write code
that directly manipulates IORs to have that effect. For inspiration,
there is some C++ code that messes with IORs in the omniORB connection
management extension in
src/lib/omniORB/connections/omniConnectionMgmt.cc in the
makeRestrictedReference function.

If you're using Python, you can access the innards of object references
by marshalling the reference into a buffer with cdrMarshal, then
unmarshalling it again using the IDL definitions for IORs. I've attached
the IDL you need and some simple code I had to hand that digs into an
IOR. You should be able to use it as the basis for something that
modifies the IORs as you require. After modification, you can do the
cdrMarshal / cdrUnmarshal in reverse to turn it back into an object
reference.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ior.idl
Type: text/x-idl
Size: 6089 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20100601/dc6af86e/ior.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iorread.py
Type: text/x-python
Size: 1238 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20100601/dc6af86e/iorread.py


More information about the omniORB-list mailing list