Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CORBA Memory Management

807589Nov 7 2008 — edited Jan 9 2009
Hi,

I programmed a little app which I use to test a database as well as connectivity between java and c++. The server side is implemented in Java, using Java IDL and Name Service (orbd). The client side is a little c++ Omniorb client.

Now, the client does a series of tests.
1. Insert 5000 objects to the database
2. Retrieve all objects from the database
3. Edit all objects on the database
4. Erase all objects from the database
5. Create an object, commit changes, and erase it immediately.

The first time I execute the client, everything works alright. But the second time the Java Server reaches the top of the heap and sometimes crashes. I ran the java server with the netbeans profiler and noticed that, after the client exits, most of the memory used stays occupied. So this is obviously a memory management problem. On the client side I destroy every object once I don't need it anymore. And still I don't get why on the Java side, everything stays in memory.

Any ideas? Should I try and play with the POA's policies? Say, using a NON_RETAIN policy and a default servant or something like that?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2009
Added on Nov 7 2008
8 comments
345 views