This discussion is archived
1 Reply Latest reply: Nov 12, 2012 10:56 AM by Joe Weinstein RSS

How to configure datasource that has unreliable database connection?

david.karr Pro
Currently Being Moderated
I have a Spring 3.1 app running in WebLogic 10.3.

It connects to several databases and mostly works perfectly fine.

There are two database connections that often fail from my app and from the Testing page in WebLogic. When I test the connection from SQuirreL, it usually works, but it does sometimes fail.

if it matters, the error I see in the app and Weblogic is this:
----------------
Could not connect to 'oracle.jdbc.xa.client.OracleXADataSource'.
The returned message is: ORA-01017: invalid username/password; logon denied
It is likely that the login or password is not valid.
It is also possible that something else is invalid in
the configuration or that the database is not available.
----------------

I know the user/password is correct.

It seems like something with the network makes the connections to these two databases unreliable. I'm trying to figure out if I can configure the datasource so it will be resilient to these connection problems. Remember that the app connects to several databases, all Oracle, and most of them are working perfectly fine. All of these databases are within the same intranet.

Also note that I have this app deployed on three different servers (laptop, test server, and production), and they all display similar behavior, although one of the problematic datasources appears to work fine from my laptop. Both datasources have trouble on both the test system and production.
  • 1. Re: How to configure datasource that has unreliable database connection?
    Joe Weinstein Expert
    Currently Being Moderated
    The things you can do are to configure Weblogic to make all the pool connections you need, at
    startup, perhaps with a loginDelaySeconds set so there is some gap between each connection
    create. Turn off shrinking, so once you have them, you should be OK indefinitely, unless connections
    also go bad in use. Then all you can do is to have test-connections-on-reserve set, and WLS will
    try to replace bad connections, but ultimately there is nothing we can do if we need a connection
    and the DBMS won't give it to us.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points