[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1967) UIGraphic accesses lazy loaded data beyond transaction boundaries
Christian Bauer (JIRA)
jira-events at lists.jboss.org
Tue Sep 25 09:23:42 EDT 2007
UIGraphic accesses lazy loaded data beyond transaction boundaries
-----------------------------------------------------------------
Key: JBSEAM-1967
URL: http://jira.jboss.com/jira/browse/JBSEAM-1967
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Affects Versions: 2.0.0.CR1
Reporter: Christian Bauer
Priority: Minor
I have a lazy loaded byte[] in my domain model which is enhanced with the Hibernate instrument task. So it's only loaded on access. If I bind this to a <s:graphicImage>, this loading is triggered after the transaction of the RENDER RESPONSE phase was committed. In that case, Hibernate will just grab a database connection to load the property, which will never be closed. JBoss AS doesn't like that:
(http-127.0.0.1-8080-2hread) 15:18:51,492 TRACE [SeamPhaseListener] after phase: RENDER_RESPONSE 6
(http-127.0.0.1-8080-2hread) 15:18:51,492 DEBUG [SeamPhaseListener] committing transaction after phase: RENDER_RESPONSE 6
(http-127.0.0.1-8080-2hread) 15:18:51,492 DEBUG [UTTransaction] committing JTA transaction
(http-127.0.0.1-8080-2hread) 15:18:51,493 TRACE [RootInterceptor] intercepted: fileHome.isIdDefined
(http-127.0.0.1-8080-2hread) 15:18:51,493 TRACE [RootInterceptor] intercepted: fileMetaMap.getFielMetaMap
(http-127.0.0.1-8080-2hread) 15:18:51,494 DEBUG [Manager] Storing conversation state: 72
(http-127.0.0.1-8080-2hread) 15:18:51,494 DEBUG [FacesLifecycle] After render response, destroying contexts
(http-127.0.0.1-8080-2hread) 15:18:51,495 DEBUG [FacesLifecycle] <<< End JSF request
(http-127.0.0.1-8080-2hread) 15:18:51,496 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection at 60b945
java.lang.Throwable: STACKTRACE
at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareSelectStatement(AbstractBatcher.java:123)
at org.hibernate.persister.entity.AbstractEntityPersister.initializeLazyPropertiesFromDatastore(AbstractEntityPersister.java:786)
at org.hibernate.persister.entity.AbstractEntityPersister.initializeLazyProperty(AbstractEntityPersister.java:758)
at org.hibernate.intercept.AbstractFieldInterceptor.intercept(AbstractFieldInterceptor.java:73)
at org.hibernate.intercept.javassist.FieldInterceptorImpl.readObject(FieldInterceptorImpl.java:82)
at org.jboss.seam.wiki.core.model.File.$javassist_read_data(File.java)
at org.jboss.seam.wiki.core.model.File.getData(File.java:87)
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:585)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at javax.faces.component.UIGraphic.getValue(UIGraphic.java:137)
at org.jboss.seam.ui.graphicImage.GraphicImageRendererBase.doEncodeBegin(GraphicImageRendererBase.java:31)
at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.encodeChildren(OutputLinkRenderer.java:148)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
It seems like this behavior was OK or has change, I didn't get this exception with Hibernate 3.2.3 but now with Hibernate 3.2.5.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list