Re: using doneWith() on corba object

David Delbecq <[email protected]> Mon, 5 Sep 2005 10:14:13 +0200
Newsgroups gmane.comp.java.enhydra.shark
Organization Institut Royal Météorologique
Message-ID <[email protected]>
Le Jeudi 1 Septembre 2005 11:21, Vladimir Puskas a écrit :
> 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.

Ok, thanks for information. Am still however wondering what i can pass
to doneWith and what not. Do you mean i can pass any corba object am not using anymore, 
except those have connect() in their interface? Also, can i call any of the doneWith(x) methods or
only the one present on object y where x was create by a call a getter of y

> 
> 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

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?
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