473,939 Members | 8,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Omniorb event channel question

Hello!

I'm using python 2.3.5 on Linux with omniORB 2.6. I'm trying to create
an object that shall listen on an event channel, but the registration
doesn't work. My code is:

class EventListener(C osEventComm.Pus hConsumer):

def __init__(self):
pass

def push(self, data):
print data.typecode() .kind()
print data.typecode() .name()

def disconnect_push _consumer(self) :
pass

[... initalize the ORB ...]

channel = orb.getRootInte rface(channelna me)
chadmin = channel.for_con sumers()
supplier = chadmin.obtain_ push_supplier()
listener = EventListener()
supplier.connec t_push_consumer (listener)

Unfortunately I get the following error at this point:
omniORB.CORBA.B AD_PARAM
Traceback (most recent call last)

test.py
70 supplier = chadmin.obtain_ push_supplier()
71 listener = EventListener()
---> 72 supplier.connec t_push_consumer (listener)
73
74

CosEventChannel Admin_idl.py
in connect_push_co nsumer(self, *args)
122
123 def connect_push_co nsumer(self, *args):
--> 124 return _omnipy.invoke( self, "connect_push_c onsumer",
_0_CosEventChan nelAdmin.ProxyP ushSupplier._d_ connect_push_co nsumer, args)
125
126 __methods__ = ["connect_push_c onsumer"] +
_0_CosEventComm ._objref_PushSu pplier.__method s__

BAD_PARAM: Minor: BAD_PARAM_Wrong PythonType, COMPLETED_NO.

What am I missing? The ORB works otherwise.

Bye,NAR
Jan 31 '06 #1
2 1857
> channel = orb.getRootInte rface(channelna me)
chadmin = channel.for_con sumers()
supplier = chadmin.obtain_ push_supplier()
listener = EventListener()
supplier.connec t_push_consumer (listener)


Not sure, but I guess you want a

listener._this( )

here.

Diez
Jan 31 '06 #2
Diez B. Roggisch <de***@nospam.w eb.de> wrote:
channel = orb.getRootInte rface(channelna me)
chadmin = channel.for_con sumers()
supplier = chadmin.obtain_ push_supplier()
listener = EventListener()
supplier.connec t_push_consumer (listener)


Not sure, but I guess you want a

listener._this( )

here.


That worked, thanks. However, the event receiving doesn't seem to work.
I've started the ORB with
corba.orb.run()

but the push() method of the EventListener object doesn't get called (or
at least the print() calls in the method are not executed) and the event
sender program is blocked in the push() call. Do I need something else
to set up?
Bye,NAR
Feb 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1612
by: Duncan Grisby | last post by:
omniORB version 4.0.2 and omniORBpy 2.2 are now available. omniORB is a robust, high performance CORBA ORB for C++. omniORBpy is a version for Python. They are freely available under the terms of the GNU LGPL. These are mainly bug fix releases. Highlights of the new releases include: - Bug fixes.
4
1964
by: Duncan Grisby | last post by:
omniORB 4.0.3 and omniORBpy 2.3 are now available. They are bug fix releases. Many thanks to all the people who have contributed bug fixes and features. omniORB is a robust, high performance CORBA implementation for C++. omniORBpy is a version for Python. They are open source, available under the terms of the GNU LGPL. As always, the releases can be downloaded from SourceForge in source and Windows binary formats:
3
1656
by: denginere | last post by:
I have a situation where I am embedding python in c++ and calling omniorb within python. c++ -> python -> c++ -> python The python is called using the following // Import the module/script pTmpModule = PyImport_Import(pName); PyObject_CallObject(pFunc, pArgs);
0
1089
by: Diez B. Roggisch | last post by:
Hi, I currently try to use omniorb it conjunction with new-style classes. What I want to accomplish is simple: I'd like to associate the authentication-info the user has provided with the current thread on each method called. However in the very moment I inherit my servant from 'object', omniORB fails to marshal the object reference. Has anybody overcome this limitation? One thought I had was to create a
1
2302
by: Melissa Wallis | last post by:
I have a class with 5 callbacks. Two of the callbacks work fine but the others don't. The main difference is that the callbacks that don't work are composed of a sequence of structs. I noticed a comment about this same problem on the web but no solution was noted. What makes the callbacks with the sequences so different? It seems that when one of the callbacks with a sequence is called it just hangs. I am talking to a TAO orb from...
3
2083
by: Birgit Rahm | last post by:
Hello newsgroup, I work with omniORB for python and I what to log the calls, does anyone in this group know how I can do this? I use the command to initialize the ORB ORB = CORBA.ORB_init(sys.argv + , CORBA.ORB_ID) but I dont get a log file or a message in pythonwin output display about anything. Does anyone know, were the log data is? And how I can store it in a file? By the way I ask also the omniORB mailing list, but here are the...
3
3936
by: gerald.maher | last post by:
Hi, I am trying to excuate the follwong code: I get the following error: Here is my Lib path:
2
3067
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton / Server activated mode on startup. The Remoting Client accesses the Remoting Class through the interface of the Class and subscribes to an event of the Remoting Class that will be fired upon the private member value change.
0
1103
by: Duncan Grisby | last post by:
I am pleased to announce that omniORB 4.1.1 and omniORBpy 3.1 are now available. omniORB is a robust, high performance CORBA implementation for C++; omniORBpy is a version for Python. You can download them in source and Windows binary forms from SourceForge: http://sourceforge.net/project/showfiles.php?group_id=51138&package_id=44914&release_id=544978...
0
11524
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11292
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10659
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4908
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3502
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.