[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3125) seam conversation and session.disconnect()
by Florian Keusch (JIRA)
seam conversation and session.disconnect()
------------------------------------------
Key: JBSEAM-3125
URL: http://jira.jboss.com/jira/browse/JBSEAM-3125
Project: Seam
Issue Type: Bug
Components: Spring
Environment: Seam 2.0.2.SP1
Spring 2.5.4
Reporter: Florian Keusch
hi,
we use seam/spring/hibernate in our application. We detected a problem that database connections are not released after each request during seam conversations. Then if we have many conversations we can run out of connections.
Let me explain this issue a little bit more:
If a conversation starts a session is opened. This session is bound to the conversation and borrows a database connection from the pool.
After the request the session doesn't have to be closed necessarily, but the session should be disconnected (to release the connection).
What happens in the code (org.jboss.seam.ioc.spring.SeamManagedSessionFactoryBean) is that the session only is 'marked' as closed.
Later seam recognizes that the conversation is still opened and the session will not be closed at the end of the request. The connection is therefore
not returned to the pool for many requests until the conversation ends.
For our case we fixed this problem by slightly changing the code of org.jboss.seam.ioc.spring.SeamManagedSessionFactoryBean (see the patch). We added code to disconnect the session
greetings fke
patch:
--- SeamManagedSessionFactoryBean.java 2008-06-19 09:17:09.152049800 +0200
+++ SeamManagedSessionFactoryBeanPatched.java 2008-05-27 20:16:46.000000000 +0200
@@ -165,8 +165,6 @@
}
if (method.getName().equals("close"))
{
- Session session = getSession();
- session.disconnect();
isClosed = true;
return null;
}
@@ -290,7 +288,6 @@
if (method.getName().equals("close"))
{
log.debug("Closing Session Proxy.");
- delegate.disconnect();
closed = true;
return null;
}
--
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
16 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1818) Patch proposed to LocaleSelector
by Marco Pancotti (JIRA)
Patch proposed to LocaleSelector
--------------------------------
Key: JBSEAM-1818
URL: http://jira.jboss.com/jira/browse/JBSEAM-1818
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Marco Pancotti
Priority: Minor
org.jboss.seam.international.LocaleSelector does not implement a getDefaultLocale method. I think it can be useful in a multi-language application. So I propose to apply the following patch in the LocaleSelector class adding the following methods (it can be more complex if you want orthogonal returns respect the return of the specified locale):
public Locale getDefaultLocale(){
return FacesContext.getCurrentInstance().getApplication().getDefaultLocale() ;
}
public String getDefaultLocaleLanguage(){
return FacesContext.getCurrentInstance().getApplication().getDefaultLocale() .getLanguage();
}
Marco Pancotti
--
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
16 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3186) org.jboss.seam.Entity$NotEntityException: Unable to establish name of entity class
by Julien Buret (JIRA)
org.jboss.seam.Entity$NotEntityException: Unable to establish name of entity class
----------------------------------------------------------------------------------
Key: JBSEAM-3186
URL: https://jira.jboss.org/jira/browse/JBSEAM-3186
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.2.SP1
Environment: JBoss 4.2.1
Hibernate 3.2.6
Reporter: Julien Buret
Priority: Minor
Attachments: HibernatePersistenceProvider.patch
Sometimes I've got this kind of exception :
org.jboss.seam.Entity$NotEntityException: Unable to establish name of entity class Test_$$_javassist_40
at org.jboss.seam.Entity.mergeAnnotationAndOrmXml(Entity.java:181)
at org.jboss.seam.Entity.<init>(Entity.java:58)
at org.jboss.seam.Entity.forClass(Entity.java:165)
at org.jboss.seam.Entity.forBean(Entity.java:145)
at org.jboss.seam.persistence.PersistenceProvider.getId(PersistenceProvider.java:64)
at org.jboss.seam.persistence.HibernatePersistenceProvider.getId(HibernatePersistenceProvider.java:168)
at org.jboss.seam.framework.EntityIdentifier.<init>(EntityIdentifier.java:13)
at org.jboss.seam.ui.converter.entityConverter.EntityLoader.createIdentifier(EntityLoader.java:40)
at org.jboss.seam.ui.converter.entityConverter.AbstractEntityLoader.put(AbstractEntityLoader.java:50)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months