stuck



All,

I got stuck because I cant persuade python-orbit to use INET instead of UNIX-sockets, and I cant find a tiny C example that shows me how to create a server.

please, perhaps someone can help me:

1.) Tell me, why the attached python server does not produce IOR with INET profile when started as:
./test-server.py -ORBIIOPUSock=0

2.) Or give me a small example server in C that can be compiled doing "configure" "make", and when running produces IOR with INET profiles.

currently I am using ORBit-0.5.8, RH7.1-i386

As long as I dont have a running server producing INET-profiles, I cant go on.

Cheers, Frank
-- 
-------------------------------------------------------------
 Frank Rehberger <frehberg@cs.tu-berlin.de>
-------------------------------------------------------------
 "Global order can arise from local interactions."
 [A.Turing, 1952]
-------------------------------------------------------------
 "when all nodes have reached that [stable] state, the whole 
 graph is as dead as a doornail and the diffusing computation 
 is defined to have terminated" [E.W.Dijkstra, 1980]
-------------------------------------------------------------
#!/usr/bin/env python

#    CORBA-binding for  Mozart-OZ <http://www.mozart-oz.org>
#    Copyright (C) 2001  Frank Rehberger <frehberg@cs.tu-berlin.de>
# 
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

import CORBA
import sys
import Simple, Simple__POA

class Instance(Simple__POA.Instance):
	def __init__(self):
		self.attr = 0

	def meth1(self, v):
		print "Received meth1: ", v, "\n"
		
	def meth2(self, v):
		print "Received meth2", v, "\n"
		
	def meth3(self, v):
		print "Received meth3", v, "\n"
		
	def meth4(self, v):
		print "Received meth4", v, "\n"
		
	def meth5(self, v):
		print "Received meth5", v, "\n"
		
	def meth6(self, a, b):
		print "Received meth6", a, b, "\n"

	def meth7(self, v, w):
		print "Received meth7: ", v, w, "\n"
		
	def meth8(self, a, b):
		print "Received meth6", a, b, "\n"

orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")
ref = Instance()._this() # implicit activation
open("./test-server.ior", "w").write(orb.object_to_string(ref))

poa._get_the_POAManager().activate()
orb.run()


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