Re: using doneWith() on corba object

Vladimir Puskas <[email protected]> Thu, 01 Sep 2005 11:21:06 +0200
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
Hello David

We provided methods doneWith() to release some specific CORBA object.

If your application does disconnect regularly, and TrackAndDisconnect 
option is true, you don't need to invoke any doneWiths. Otherwise, if 
your application holds a connection to Shark for a long time and creates 
many objects, calling doneWith on objects you don't need anymore helps 
reducing server's memory footprint.

Method disconnect will detach the connection from the orb, so you 
shouldn't use that instance anymore.

you wrote:
> Hello everyone.
> 
> What is the purpose of the doneWith() method on the varioux shark corba
> objects. Am i supposed to free all objets i get using z=y.getXXXX() by calling y.doneWith(z);
> 
> Or am i supposed not to touch it?
> Using it on sharkconnection seems to raise a CORBA exception:
> if (sharkConnection !=null) {
> 			try {
> 				if (resource!=null)
> 					sharkConnection.doneWith(resource);
> 				sharkConnection.disconnect();
> 				workflowServer.doneWith(sharkConnection);
> 			} catch (BaseException e) {
> 				throw new JspException(e);
> 			} catch (NotConnected e) {
> 				throw new JspException(e);
> 			} 
> 		}
> 
> workflowServer.doneWith(sharkConnection); does throw exception while
> sharkConnection.doneWith(resource); works well.
> ------------------------------------------------------------------------

hope this helps
-- 
Vlada
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws