Calling Shark server and running an instance in my Java program (attach a .java example please)
Vojtech Huser <[email protected]> Thu, 1 Sep 2005 10:24:30 -0600
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <[email protected]> |
There are many people in the mailing list which are calling Shark server and running an instance in my Java program . I read the OMG specs but it would be great having an example of a simple Java program which starts a server, runs one sime demo process (e.g. one of the xpdl provided with Shark) instance and ends. Vojtech ( for example this post shows what I mean. and many others, but it is always just sniplets of code.... never a complete simple example to learn from... :-( ) On 9/1/05, Vladimir Puskas <[email protected]> wrote: > > 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 > > > > > -- > You receive this message as a subscriber of the [email protected] 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 > > >
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