-
1. Re: Testing if the DB is online or not
juha Sep 3, 2002 4:23 PM (in response to paulsinnema)run a simple query to the database?
-
2. Re: Testing if the DB is online or not
paulsinnema Sep 16, 2002 7:57 AM (in response to paulsinnema)Yes, I've tried that one. It returns an error if the DB is offline, but since this is going to be a central routine that's going to be used by all the beans and servlets in the site the following problem arises. The routine that does the simple query can only be called once. It looks as if all the next calls are blocked by JBoss or JDBC until the DB is available again.
-
3. Re: Testing if the DB is online or not
juha Sep 23, 2002 7:24 AM (in response to paulsinnema)Did you go through a DataSource lookup or directly using a hardcoded JDBC url with your query?
If former, you could try to get around the pools by not using the DataSource bound to JNDI. Use a non-pooled JDBC connection instead. -
4. Re: Testing if the DB is online or not
paulsinnema Sep 25, 2002 5:05 PM (in response to paulsinnema)Can you tell how? An example would be nice!
-
5. Re: Testing if the DB is online or not
juha Sep 25, 2002 5:26 PM (in response to paulsinnema)just use straight JDBC, init the JDBC driver class and create the query and execute it, there should be plenty of doco on the web
if the JBoss pools are getting in the way then that's a way around them (ie dont use the datasources provided by jboss), if its in the JDBC driver implementation then you have to go and ask the driver suppliers instead