java - How to make J2EE weblogic application resilient to database problems -


i have web application running on oracle weblogic server 11g. uses datasource defined in application server connect oracle database (11g too), class

oracle.jdbc.xa.client.oraclexadatasource

  • if reason database becomes not present , comes backs, application running ok (it gets exceptions while trying access db fine , can again new connections when db comes back)

  • however, if database down during weblogic server startup, the datasource not deployed on server , application throws exception because has not datasource available, deployment marked failed , of course nothing repair automatically.

is there way make datasource deployed if database not present during server startup ? (such application becomes usable when database back)

why want deploy application without valid datasource?

you possibly fake datasource (create dummy datasource same jndi name) , assuming application not validate datasource schema @ startup semi-functional running application (which fail first db interaction).

when real datasource , running won't able switch it. still have restart application server.

update:

according j2ee spec (1.5 version) resources binded during deployment process. believe possible implement custom factory return dummy / active datasource. worth effort implement? ;)

ee.5.6.2 deployer’s responsibilities

bind resource manager connection factory reference resource manager connection factory exists in operational environment. deployer may use, example, jndi linkref mechanism create symbolic link actual jndi name of resource manager connection factory. re- source manager connection factory type must compatible type de- clared in res-type element.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -