[EJB/JBoss] - ConnectionManager issue in Stateless bean and injected Entit
by kearns7153ï¼ tds.net
I am getting the following INFO message from the ConnectionManager when accessed from a Stateless bean:
14:36:01,687 INFO [ConnectionManager] forcing batcher resource cleanup on transaction completion; forgot to close ScrollableResults/Iterator?
The application looks like it is working so what does this mean?
I am using JBoss 4.0.5 GA, but same issues exists with 4.0.4 GA.
I am using Postgresql 8.1 for a database.
I am using Seam, but this error occurs without invoking my UI client.
@Stateless
public class MyTrialBean implements MyTrailRemote
{
@PersistenceContext
private EntityManager em;
...
public String update(Biu biuAttributes)
{
try {
String serialNumber = biuAttributes.getSerialNumber();
List bius = em.createNamedQuery("Biu.findBySerialNumber")
.setParameter("serialNumber", serialNumber)
.getResultList();
if ((bius == null) || (bius.size() == 0)) {
return ProXmlResponse.getError(ProError.BIU_NOT_FOUND);
}
Biu biu = bius.get (0);
biu.setLastContact(new Date());
em.merge(biu);
} catch (Exception e) {
return ProXmlResponse.getError(ProError.BIU_UPDATE_FAILED);
}
}
...
Other posts/replies state that I should close the connection in a finally block.
I have tried various calls to the EntityManager but those usually result in
an error.
I based most of what I am doing here on the EJB3 TrailBlazer demos.
I am looking for more information on this problem to see if it is related to the following more serious ConnectionManager problem.
14:52:08,817 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
14:52:08,817 ERROR [JDBCExceptionReporter] No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
14:52:08,817 ERROR [STDERR] Nov 30, 2006 2:52:08 PM checkStats
INFO: PurgeStatsBean.checkStats()...Failed
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990196#3990196
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990196
18Â years
[Performance Tuning] - Re: Identifying performance bottlenecks
by jshrinivas
Analyzing thread stack traces indeed proved useful. Thanks for your help. I looked at http-0.0.0.0-# threads and most of them were in WAIT/BLOCKED state. All these threads seem to be waiting for JDBC connection. Basically it seems that they are waiting on org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection method.
During this I also realized that JBoss XA JDBC pool config is not intelligent (or I might be missing something here). I had specified min-pool-size as 200 and did not specify max-pool-size and it defaulted to 20, which was strange. I am going to post this on JCA forum. Anyways, changing max-pool-size helped a bit and I was able to get another 5% CPU utilized due to that.
I also found out that there was a bug report on org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection being slow. I am not sure if it is fixed in 4.0.5-SP1-ejb3.
-Shrinivas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990195#3990195
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990195
18Â years
[JBoss jBPM] - Re: JBPM3 with tomcat
by meghanai_99
ok so finally I got the db created and deployed my jbpm web application on tomcat successfully. Now I get server error 500. Here is the stack trace -
javax.faces.FacesException: Cannot get value for expression '#{userBean.userSelectItems}'
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
It is coming from login.jsp when it tries to resolve userSelectItems. How do I debug this now? Do I have specify these users somewhere so that they are created in db?
Thank you in advance,
Meghana
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990192#3990192
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990192
18Â years