HSQLDB: How to check if Server implementation is already running ? - JDBC JAVA

This is a discussion on HSQLDB: How to check if Server implementation is already running ? - JDBC JAVA ; I created application which start new Server() from a code and it use only one database. But if I start another implementation of my application (it is another main method) it is not neccessary to create another Server but it ...

+ Reply to Thread
Results 1 to 7 of 7

HSQLDB: How to check if Server implementation is already running ?

  1. Default HSQLDB: How to check if Server implementation is already running ?


    I created application which start new Server() from a code and it use only
    one database. But if I start another implementation of my application (it is
    another main method) it is not neccessary to create another Server but it is
    enough to add new database (database.0 ... n). How to know that one Server
    is already running ?



  2. Default Re: HSQLDB: How to check if Server implementation is already running ?

    Hello, Dado!
    You wrote on Sun, 20 Aug 2006 19:36:29 +0200:

    D> I created application which start new Server() from a code and it use
    D> only one database. But if I start another implementation of my
    D> application (it is another main method) it is not neccessary to
    D> create another Server but it is enough to add new database
    D> (database.0 ... n). How to know that one Server is already running ?

    Use Singleton pattern.


    With best regards, Stepan Mozyra



  3. Default Re: HSQLDB: How to check if Server implementation is already running?

    Stepan Mozyra wrote:
    > D> I created application which start new Server() from a code and it use
    > D> only one database. But if I start another implementation of my
    > D> application (it is another main method) it is not neccessary to
    > D> create another Server but it is enough to add new database
    > D> (database.0 ... n). How to know that one Server is already running ?
    >
    > Use Singleton pattern.


    To me it sounds as if the original poster is starting
    two programs (as in different JVM's).

    Arne

  4. Default Re: HSQLDB: How to check if Server implementation is already running ?


    "Arne Vajhoj" <arne@vajhoej.dk> je napisao u poruci interesnoj
    grupi:fT6Gg.3850$_q4.2540@dukeread09...
    > Stepan Mozyra wrote:
    >> D> I created application which start new Server() from a code and it use
    >> D> only one database. But if I start another implementation of my
    >> D> application (it is another main method) it is not neccessary to
    >> D> create another Server but it is enough to add new database
    >> D> (database.0 ... n). How to know that one Server is already running ?
    >>
    >> Use Singleton pattern.

    >
    > To me it sounds as if the original poster is starting
    > two programs (as in different JVM's).
    >
    > Arne


    Yes of course, if you started application twice you got 2 different JVM. Is
    something wierd with that ? Can I use Singelton once in 2 or more different
    JVM-s ? I mean, I don't think that Singelton will know if some class
    (Server for example) is instanced once in all JVM-s.



  5. Default Re: HSQLDB: How to check if Server implementation is already running ?


    "Dado" <mario_zupan@inet.hr> je napisao u poruci interesnoj
    grupi:ecbkcr$i2h$1@ss408.t-com.hr...
    >
    > "Arne Vajhoj" <arne@vajhoej.dk> je napisao u poruci interesnoj
    > grupi:fT6Gg.3850$_q4.2540@dukeread09...
    >> Stepan Mozyra wrote:
    >>> D> I created application which start new Server() from a code and it
    >>> use
    >>> D> only one database. But if I start another implementation of my
    >>> D> application (it is another main method) it is not neccessary to
    >>> D> create another Server but it is enough to add new database
    >>> D> (database.0 ... n). How to know that one Server is already running
    >>> ?
    >>>
    >>> Use Singleton pattern.

    >>
    >> To me it sounds as if the original poster is starting
    >> two programs (as in different JVM's).
    >>
    >> Arne

    >
    > Yes of course, if you started application twice you got 2 different JVM.
    > Is something wierd with that ? Can I use Singelton once in 2 or more
    > different JVM-s ? I mean, I don't think that Singelton will know if some
    > class (Server for example) is instanced once in all JVM-s.
    >

    Maybe I need to use Singelton to allow only one instance of my application
    and change my application to allow opening more than one database ?



  6. Default Re: HSQLDB: How to check if Server implementation is already running ?

    Hello, Arne!
    You wrote on Sun, 20 Aug 2006 20:12:02 -0400:

    AV> To me it sounds as if the original poster is starting two programs
    AV> (as in different JVM's).

    Ok. I was wrong.
    May be Server can opening some port, and any Application will communicate
    with Server through it?


    With best regards, Stepan Mozyra.



  7. Default Re: HSQLDB: How to check if Server implementation is already running ?


    "Stepan Mozyra" <gorynych@voliacable.com> je napisao u poruci interesnoj
    grupi:ecg066$1qst$1@behemoth.volia.net...
    > Hello, Arne!
    > You wrote on Sun, 20 Aug 2006 20:12:02 -0400:
    >
    > AV> To me it sounds as if the original poster is starting two programs
    > AV> (as in different JVM's).
    >
    > Ok. I was wrong.
    > May be Server can opening some port, and any Application will communicate
    > with Server through it?
    >
    >
    > With best regards, Stepan Mozyra.
    >

    Yes, but I didn't separate Server and client but start server when my app is
    starts. Now I want to open more then one database (2 or more clients app).
    IMO, I can avoid starting 2 server only if I have System.exit(0) when the
    user try to starts second implementation of my app. But I was interesting to
    finishing my app to work in a LAN. What is a practise from a HSQLDB point of
    view?



+ Reply to Thread

Similar Threads

  1. CL Implementation for long running web app (Hunchentoot)
    By Application Development in forum lisp
    Replies: 10
    Last Post: 10-21-2007, 05:12 PM
  2. Shutdown hsqldb server
    By Application Development in forum JDBC JAVA
    Replies: 0
    Last Post: 04-18-2007, 10:11 AM
  3. Check if running on "active" clustered server
    By Application Development in forum TCL
    Replies: 1
    Last Post: 04-05-2007, 08:35 AM
  4. HSQLDB Memory Limit Running with CACHED Tables
    By Application Development in forum JDBC JAVA
    Replies: 0
    Last Post: 03-20-2007, 05:34 PM
  5. Impact of running IIS 6 SMTP on server running Exchange
    By Application Development in forum Inetserver
    Replies: 2
    Last Post: 10-04-2004, 07:34 PM