Ozone Apirak | 1 Apr 2004 03:05
Picon

My object disappear when I restart ozone.

Hi

I really need your help. my program working very well if I did not 
shutdown it. I can create insert delete. I can restart my application 
and reconnect to my database but when I restart ozone my database will 
disappear. I can't get object from "db.objectForName(ObjName);". It 
return null.

this is my init and main method

     public void init(OzoneInterface database){
         db = database;

         String name = MetCollectionImpl.class.getName();

         Object obj = null;

         try{
           System.out.println("looking Object name "+ObjName+" from db");
           obj = db.objectForName(ObjName);
           metc = (MetCollection)obj;
           System.out.println("get "+metc.getName()+" read ");          
testRead();
           testReadComplicate();          testDelete();

         }catch(Exception e){
           try { //Create new DB
               System.out.println("can't looking for object because: 
"+e);
               obj = db.createObject(name, 0,ObjName);
(Continue reading)

Dr Brendan Gowing | 1 Apr 2004 18:15

Re: My object disappear when I restart ozone.


You're creating a new object on *ANY* exception??!!? That is probably
*really* dangerous and not what you want to do. Rewrite your code to check
for a null obj instead and test again.

-BG

> Hi
>
> I really need your help. my program working very well if I did not
> shutdown it. I can create insert delete. I can restart my application
> and reconnect to my database but when I restart ozone my database will
> disappear. I can't get object from "db.objectForName(ObjName);". It
> return null.
>
> this is my init and main method
>
>
>      public void init(OzoneInterface database){
>          db = database;
>
>          String name = MetCollectionImpl.class.getName();
>
>          Object obj = null;
>
>          try{
>            System.out.println("looking Object name "+ObjName+" from db");
>            obj = db.objectForName(ObjName);
>            metc = (MetCollection)obj;
>            System.out.println("get "+metc.getName()+" read ");
(Continue reading)

Per Nyfelt | 4 Apr 2004 21:17
Picon

Ozone 1.2 release candidate 2 is now available at SF

Friends,

The third pre-release (1.2 rc2) of the next version (1.2) of Ozone is now 
available. This is probably the final pre-release so please try it out and 
report any findings to the users list (ozone-users at lists.sourceforge.net).

Changes since the beta are primarily bug fixes and performance improvements by 
Wieslaw and Leo.

(For those wondering about rc2 the answer is that rc1 never made it to public 
eye but was caught in initial testing.)

Best regards,
Per

-------------------------------------------------------
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
Gonçalo E.D. Luiz | 5 Apr 2004 00:41
Picon
Picon

Re: Ozone 1.2 release candidate 2 is now available at SF

Per Nyfelt wrote:

>Friends,
>
>The third pre-release (1.2 rc2) of the next version (1.2) of Ozone is now 
>available. This is probably the final pre-release so please try it out and 
>report any findings to the users list (ozone-users at lists.sourceforge.net).
>
>Changes since the beta are primarily bug fixes and performance improvements by 
>Wieslaw and Leo.
>
>(For those wondering about rc2 the answer is that rc1 never made it to public 
>eye but was caught in initial testing.)
>
>Best regards,
>Per
>
>
>
>-------------------------------------------------------
>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
>_______________________________________________
>Ozone-users mailing list
>Ozone-users <at> lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/ozone-users
>
>  
(Continue reading)

Ozone Apirak | 5 Apr 2004 05:46
Picon

Re: My object disappear when I restart ozone.

problems is solve by change from LocalDatabase to ExternalDatabase
How do i back to use LocalDatabase?

Apirak Panatkool

e-mail bank <at> apirak.com
phone 01-4033320
On Apr 1, 2004, at 11:15 PM, Dr Brendan Gowing wrote:

>
> You're creating a new object on *ANY* exception??!!? That is probably
> *really* dangerous and not what you want to do. Rewrite your code to 
> check
> for a null obj instead and test again.
>
> -BG
>
>
>
>> Hi
>>
>> I really need your help. my program working very well if I did not
>> shutdown it. I can create insert delete. I can restart my application
>> and reconnect to my database but when I restart ozone my database will
>> disappear. I can't get object from "db.objectForName(ObjName);". It
>> return null.
>>
>> this is my init and main method
>>
>>
(Continue reading)

Ozone Apirak | 5 Apr 2004 06:47
Picon

Local and remote

Hi

normally we use remote to open database

ExternalDatabase.openDatabase("ozonedb:remote://localhost:3333")

I don't know which case that we need local

ExternalDatabase db = 
ExternalDatabase.openDatabase("ozonedb:local://dbDir")

is it faster than remote?

Thank you.

Apirak Panatkool

e-mail bank <at> apirak.com
phone 01-4033320
Leo Mekenkamp | 5 Apr 2004 14:25
Picon
Picon
Favicon

Re: Local and remote

> Hi
>
> normally we use remote to open database
>
> ExternalDatabase.openDatabase("ozonedb:remote://localhost:3333")
>
> I don't know which case that we need local
>
> ExternalDatabase db =
> ExternalDatabase.openDatabase("ozonedb:local://dbDir")

When you use the local variant the server is started within the same jvm
as your application. The remote variant connects to an already running
server in another jvm (can also be on another machine). The remote variant
must be used when you need multiple clients to connect to 1 database.

> is it faster than remote?

Performance is usually about the same. Depending on network, type of
computers, multi-threaded vs. single-threaded etc., remote may very well
be faster.

Cheers,
Leo Mekenkamp

-------------------------------------------------------
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
(Continue reading)

Leo Mekenkamp | 5 Apr 2004 14:43
Picon
Picon
Favicon

Re: Ozone 1.2 release candidate 2 is now availableat SF


>>The third pre-release (1.2 rc2) of the next version (1.2) of Ozone is now
>>available.

> Does the rc2 support transaction inheritance when creating new threads ?

No. As there is no way for the server to find out [a) who created a new
thread, b) when a new thread is being created/started] this will not be
feasable in the nearby future. Best way to have server-side execution in
multiple threads is to have multiple threads on the client using the same
database and database proxies; Ozone support for this is seamless.

Cheers,
Leo

-------------------------------------------------------
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
Leo Mekenkamp | 5 Apr 2004 15:11
Picon
Picon
Favicon

Re: My object disappear when I restart ozone.

> problems is solve by change from LocalDatabase to ExternalDatabase
> How do i back to use LocalDatabase?

Simple, by stopping the external database process (^c or Q in ozone server
window) and changing the connection url in your app
(ozonedb:local://<dir>).

IIRC there was an issue with 1.1 and LocalDatabase that fitted your
description; this problem was no longer reproducible on the development
version. So, if all is right release candidate 2 for the new 1.2 package
should no longer exhibit the bug you experienced.

If you run your original program against ozone 1.2rc2, does your first
created object still disappear?

Cheers,
Leo

-------------------------------------------------------
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
Ozone Apirak | 8 Apr 2004 10:54
Picon

Re: My object disappear when I restart ozone.

I try 1.2rc already. It's still disappear for local.

it return null when I call.

           try { //Create new DB
               System.out.println("can't looking for object because: 
"+e);
               obj = db.createObject(name, 0,ObjName);
               System.out.println("create obj name:"+ obj);

               metc = (MetCollection) obj;

               metc.setName("OzoneMetBroker2");
               System.out.println("ObjectDB name: "+metc.getName()+" was 
created by me");

               testCreate();
           } catch(Exception e2) {
               System.out.println("Can't create DB: "+ e2);
           }

it work very well If I did not shutdown database.

Apirak Panatkool

e-mail bank <at> apirak.com
phone 01-4033320
On Apr 5, 2004, at 8:11 PM, Leo Mekenkamp wrote:

>> problems is solve by change from LocalDatabase to ExternalDatabase
(Continue reading)


Gmane