Re: My object disappear when I restart ozone.

"Dr Brendan Gowing" <[email protected]>
Newsgroups gmane.comp.java.ozone.user
Message-ID <[email protected]>
> :)
>
> I don't know why but the problems came only when I use LocalConnection.
> I can't call my object after I restart my database (by ctrl-c). I can

AH! I now understand your problem! The code you sent me works but you seem
to be running TWO Ozone DBs on the same database directory. One is the
standalone Ozone created when you type "rundb" and the other is the local
in-JVM Ozone created by the LocalDatabase object. You shouldn't be able to
press Ctrl-C with a LocalDatabase.

That is, a LocalDatabase connection is not just a connection; it creates
an actual running database server inside your JVM. When your program
starts, it starts up a local database server in your MetTest program's
JVM. When your program finishes, the database server is automatically shut
down when the JVM exits. You do not need to run a separate Ozone database
in a separate JVM (i.e., no need to hit ctrl-c). But you _are_ running a
separate Ozone server in a different JVM when you type rundb and the two
databases are trying to manage the files in the same directory.

Here's the solution. If you use an ExternalDatabase, you need to type
'rundb' and then 'run'. When you use a LocalDatabase you only need to type
'run' - there is no need for 'rundb'.

I hope this helps,
-BG

PS not for others: 'run' and 'rundb' are shell scripts in the originally
attached source code.


> restart my application and it work well if I don't restart my db.
>
> please, help me.
> This is my simple code (only meta data part)



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.