日期:2014-05-20  浏览次数:20896 次

J2EE连接Oracle的一个问题
因为公司程序经常出一个连接池不够用的情况,我现在做了一个测试:
我在Weblogic 中设置了最大连接数为:1
然后我登录系统没有问题,
但是我刷新一下只有就出现这个问题了。程序首页有一个 每几秒刷新的公告功能,这个公告数据是查询出来的
下面是我刷新出的问题:

15:46:23,546 ERROR JDBCExceptionReporter:46 - weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool jwjd to allocate to applications, please increase the size of the pool and retry..
15:46:23,546 ERROR JDBCExceptionReporter:46 - weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool jwjd to allocate to applications, please increase the size of the pool and retry..
15:46:23,546 ERROR JDBCExceptionReporter:46 - Cannot obtain connection: driverURL = jdbc:weblogic:pool:jwjd, props = {enableTwoPhaseCommit=false, connectionPoolID=jwjd, jdbcTxDataSource=true, dataSourceName=jwjd}
15:46:23,546 ERROR JDBCExceptionReporter:46 - Cannot obtain connection: driverURL = jdbc:weblogic:pool:jwjd, props = {enableTwoPhaseCommit=false, connectionPoolID=jwjd, jdbcTxDataSource=true, dataSourceName=jwjd}
15:46:23,546 ERROR JDBCExceptionReporter:37 - Cannot open connection
weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool jwjd to allocate to applications, please increase the size of the pool and retry..
at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:205)
at weblogic.jdbc.pool.Driver.connect(Driver.java:161)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:546)
at weblogic.jdbc.jts.Driver.connect(Driver.java:140)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:344)
at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:61)
at net.sf.hibernate.impl.SessionFactoryImpl.openConnection(SessionFactoryImpl.java:396)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:2914)
at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:39)
at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:22)
at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1981)
at com.hzjc.zfba.transaction.HibernateTxManager.beginTransaction(HibernateTxManager.java:94)
at com.hzjc.zfba.model.impl.dao.BusinessDAO.beginTransaction(BusinessDAO.java:128)
at com.hzjc.zfba.action.jwjd.service.impl.TxglServiceImpl.checkUpState(TxglServiceImpl.java:76)
at com.hzjc.zfba.security.impl.AuthorizationImpl.getTxList(AuthorizationImpl.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1185)
at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:952)
at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
at jsp_servlet._jwjd.__jwgg._jspService(__jwgg.java:416)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7051)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)