Re: [cx-oracle-users] subscribe in cx_oracle
Brought to you by:
atuining
From: Mark <mar...@bl...> - 2010-11-15 10:40:06
|
Anthony Tuininga <anthony.tuininga@...> writes: > This is actually just a simple problem and you'll probably kick > yourself when you realize what is going on. > > In your method you are creating the subscription and then, as soon as > the function ends, the subscription goes out of scope and is > immediately destroyed! If you return the subscription from the method > or you make sub a global by adding "global sub" just before creating > the subscription all works as expected. Yes, of course you were quite right. :-) I thought it was some exotic namespace type of problem/restriction with cx_oracle (I saw the namespace attribute on one of the cx_oracle object definitions) ... and it turned out to be a really simple namespace / scoping issue. Ah well. I'd made a deliberate effort to just get on with my test using whatever seemed to work, but once I saw your reply I fixed it to use a more natural structure - and it looks like it's working nicely now :-) Thanks again, Mark. |