Scott-

/*courtesy of W.L. daSilva http://www.informit.com/articles/article.asp?p=23734&redir=1*/
Using this sample for your struts-config.xml
<data-sources>
 <data-source
   autoCommit="false"
  description="First Database Config"
  driverClass=" org.gjt.mm.mysql.Driver"
    maxCount="4"
    minCount="2"
    password="admin"
      url="jdbc:mysql://localhost/ARTICLEDB"
      user="admin"
 />
</data-sources>

Confirm the mySQL information from my.cnf is represented accurately in your data-sources <data-source> is correct

Confirm that mysql database listener is indeed listening on the port idenitified by my.cnf (netstat -a)

verify struts-config.xml data-sources <datasource> information is correct for your installation (see above)

and log everything that is happening within your ActionServlet InitModuleDataSources

HTH,
Martin-

----- Original Message ----- From: "Scott Purcell" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Wednesday, June 01, 2005 10:05 AM
Subject: Seeking Advice Error Handling


Hello,

I have created a site with a mysql database back-end, and full struts front end. I have a filter to ensure the creation of some session app objects, and the site is pretty clean.

But over the weekend, I found a problem that I am seeking advice from. For some reason, the mysql database went down, causing the site to be all screwed up. I have extended the RequestProcessor but can not figure out how to handle errors from the database.

I would like to in the requestProcessor extended class, possibly do a simple query against a known table, and if the result is null, switch them to a site down action class.

Can this be done in the requestProcessor area?

Any advice would be appreciated.

Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to