Connection manager not available during shutdown
Issue
- It appears that the JDBC database sources are shutdown before the application is finished with it.
2012-12-06 09:19:22,094 ERROR com.qwest.qpartner.db.DBHelper [] - getConnection(): Caught NamingException looking for datasource: java:jboss/datasources/rcDataSource rethrowing as SQLException - DATA SRC NAME NOT FOUND
javax.naming.NameNotFoundException: datasources/rcDataSource -- service jboss.naming.context.java.jboss.datasources.rcDataSource
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)
at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:122)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at com.xyz.mno.db.DBHelper.getConnection(DBHelper.java:223)
at com.xyz.mno.db.DBHelper.getRcConnection(DBHelper.java:187)
at com.xyz.mno.db.BaseDAO.getRcConnection(BaseDAO.java:88)
at com.xyz.pqr.sys.ActivityLog.doInsert(ActivityLog.java:145)
at com.xyz.pqr.sys.ActivityLog.insertUserActivity(ActivityLog.java:110)
at com.xyz.pqr.sys.ActivityLog.insertLoggedInMinutesActivity(ActivityLog.java:296)
at com.xyz.mno.jmx.HttpSessionListener.logMinutes(HttpSessionListener.java:89)
at com.xyz.mno.jmx.HttpSessionListener.sessionDestroyed(HttpSessionListener.java:61)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:690)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:653)
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:676)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3995)
at org.jboss.as.web.deployment.WebDeploymentService.stop(WebDeploymentService.java:108)
at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911)
at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
Is there any way to ensure the data source sticks around until listeners have completed their shutdown?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
