After reading your post I thought
oh no!and promptly went and shutdown my DB to test the application I'm currently working on. I'm using mysql 5.1.38 with an XA datasource. After shutting down mysql seam immediately logs the loss of connection however all static content (images and xhtml pages without DB access) still render fine. When attempting to connect to the DB to login etc you are redirected to a page and a nice message of
connection refusedis displayed - which is what I would expect given that the DB is down. :)
So unless I've missed the point it appears that seam + mysql + XA works just fine.
MySQL might be worth a try if you are not tied to either postgres or oracle.
I am jealous ;). I assume the page you are redirected to is a typical facelets/seam error.xhtml page or some sort, correct?
and you are using the exception handlers in pages.xml, correct?
(ie. just hoping maybe I could steal a way to workaround this from you).
thanks for responding with info on mysql!!!
I also have no problems using MS SQL server 2000,2005 or 2008, same goes for Postgres 8.3 and up
XA data sources work just fine.. I had some minor problems with my code with it but nothing with seam...
Must be oracle jdbc problem, which wouldnt surprise me too much :)
Tomaz, I thought I tested postgres XA...I know postgres JDBC worked fine. You are using XA ds not JDBC with postgres, right?
Also, your test is logging in while the db is down results in a nice error page from seam, correct? (maybe I messed my postgres XA test up somehow but I could have sworn it tried to open a db connection when any http request came in for every request which ended in infinite redirect).
Happy to help if I can. Am about to go away for a couple of days though (back sunday). But briefly - Yes the page I redirect users back to on error is the home.xhtml page where I display error/info messages and it is defined as the page to go to for exceptions in pages.xhtml. Am happy to provide code examples on my return if needed.
can you run this full test case...(I beleive this new test case fails for all databases including yours but wanted to verify)...
Full test case discovered has to be specifically run this way 1. hit a web page in your app 2. take down the database 3. hit a web page in your app RESULT A: goes to a a nice error page our result when adding check-valid-connection-sql was getting infinite redirect regardless of postgres or oracle now 4. bring db back up 5. hit a web page RESULT B: app works again our result 'without' check-valid-connection-sql was the connection was hosed and never worked again.
ie. we needed check-valid for result B but then needed to go solve the infinite redirect problem.
Sorry for the delay. I'm happy to check this for you but I had a major hardware failure a couple of days ago and am busy rebuilding. Am back on deck today and will hopefully get to this soon.
thanks, we did work around it but the solution is not as clean as it would be had this test case worked to begin with :(. I will be looking forward to your results...I can be patient now that we have a hack in place for this.