Re: Visibroker and Oracle Pro*C

From: Rich Whitsell <rwhitsel_at_codewave.com>
Date: 1998/07/02
Message-ID: <6ngpgk$e0r_at_nntp02.primenet.com>#1/1


Recently, Ajay M. Desai <adesai_at_dcn.att.com> uttered:
>In a pervious post I mistakenly stated out problem as being that signal
>handlers were not being called after oracle was called. I apologize.
>This is the
>correct problem. We are haveing problems shuting down our CORBA
>server after we connect to oracle. If no database code is called in our
>application shutdown work correctly, after the CORBA::ORB::shutdown
>method is called and causes boa->impl_is_ready(); to unblock and the
>progam terminates correctly
>but after any datbase access impl's are called the ORB shuts down but
>the boa
>incorrectly thinks there are still existing operations and continues to
>block.
>Any new connection are refused which shows the shutdown worked but for
>some
>reason the boa thinks that existing operations(threads) still exist. We
>are
>connectting to oracle for each corba method invokation. A view of what
>the debugger sees is also below after serveral method invokations.
>I am at wit's end. Any help greatly appreciated.

[snip debug stuff]

Ajay, I'm just taking a shot in the dark here, but be sure that you are terminating each connection you make to the database. If you are opening a database connection for each thread (if you're multithreaded) make sure the disconnect code is in the destructor for the thread. From what you said, you're at least opening a new connection for each method call, so be sure to disconnect from the database before exiting the method.

Generally, connections to the database are made with an EXEC SQL CONNECT statement. Disconnecting from the database is generally done with an EXEC SQL COMMIT WORK RELEASE statement.

Now I'm going to go a little off-topic and climb up on my soapbox.

I personally don't care for using Pro*C -- and I especially don't like mixing it with any truly object-oriented language like C++ and an object-oriented architecture like CORBA.

I highly recommend, in your case, sticking with a "pure" C++ implementation and using something like the RogueWave C++ libraries for database access. I found that I end up with a much cleaner implementation and it cut my development time in half compared to having to deal with Pro*C.

The problem: RogueWave is not free.

That's all. I'm off my soapbox, now. Hope I helped a little.

--
Rich Whitsell, rwhitsel_at_codewave.com
Codewave, Inc.
http://www.codewave.com
Unix C/C++, Java, JavaScript, HTML/CGI, CORBA, and Oracle development.
Received on Thu Jul 02 1998 - 00:00:00 CEST

Original text of this message