RE: Try to catch if an instance is running

"Paul-Benoit Larochelle" <[email protected]> Wed, 9 Nov 2005 10:56:01 -0500
Newsgroups gmane.comp.db.mckoi
Message-ID <001001c5e546$15a36b70$7801a8c0@LaptopToshiba>
Thanks a lot it works...
 
Paul-Benoit

-----Original Message-----
From: Hrvoje Bartolin [mailto:[email protected]] 
Sent: Wednesday, November 09, 2005 04:01
To: [email protected]
Subject: Re: Try to catch if an instance is running



I dont have McKoi documentation here, try to catch Throwable. 


Srdačan pozdrav,

Hrvoje Bartolin
Etna d.o.o.




"Paul-Benoit Larochelle" <[email protected]> 


09.11.2005 05:34 


Please respond to
[email protected]



To
<[email protected]> 

cc

Subject
Try to catch if an instance is running

	




Hello, 
  
sorry do not know if I e-mail at the good place... not clear in the html
where to post a question 
  
I'm using an embedded database... 
if an instance is already running I would like to be able to send a
message to the user "you already have an instance of the application
running" 
however even if I do 
  
      try {
       conn = DriverManager.getConnection(url, username, password);
     }
     catch (Exception e) {
         System.out.println(
                 "Unable to make a connection to the database.\n" +
                 "The reason: " + e.getMessage());
               return;
              
       } 
the catch catches nothing and the application crashed with an error
about the journal file 
How can I trap the exception ? 
  
Thanks  Paul-Benoit