[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3873) Memory leak using EJB transactions and jBpm contexts
by Torsten Fink (JIRA)
Memory leak using EJB transactions and jBpm contexts
----------------------------------------------------
Key: JBSEAM-3873
URL: https://jira.jboss.org/jira/browse/JBSEAM-3873
Project: Seam
Issue Type: Bug
Components: BPM, Core, EJB3
Affects Versions: 2.1.1.GA
Environment: JBoss 4.2.x, Mac OSX and Linux environments, Java 1.5
Reporter: Torsten Fink
Attachments: MemoryLeakEventKontext.tgz
Our application had to survive a night with full load. On the next morning the heap was full of JbpmContext's.
After looking at the source code of Seam and at the debug messages we came up with this hypothesis:
* The SFSB EjbSynchronizations is placed in the event context, the Seam-JbpmContext-Component also lives in the event context.
* Using EJB transactions, EjbSynchronizations is responsible for cleaning up the JbpmContext after the end of the transaction.
* Unfortunately the event context ends BEFORE EjbSynchronizations has the chance to clean up the JbpmContext.
Using BMT the transaction ends before the event context ends. Thus, the JbpmContext is cleaned up.
We switch all our MDBs, EJB-timers, and Web-services from CMT to BMT and (after fixing some other leaks, e.g. a class loader issue in jBpm), we survived the night.
I wrote a small test application that shows the memory leak and I will try to attach it to this issue.
It is a Maven application that consists of
- a Web-GUI to start the test and displays the results (http://localhost:8080/leak/)
- a SFSB that sends 10 messages each to two queues (the standard queues A and B), waits a little bit, and does a gc
- two MDBs, one with CMT, one with BMT, which uses Seam injection to access a jBpm-Context
- an application scoped POJO that saves the contexts in a Set using a weak reference
After executing the tests and the GC, the surviving references are displayed. You can see that the CMT references are not gs'ed whereas the BMT references are cleaned up. You can execute the test several times.
--
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
14 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4196) Infinite Loop bug in JBPM integration
by Elias Ross (JIRA)
Infinite Loop bug in JBPM integration
-------------------------------------
Key: JBSEAM-4196
URL: https://jira.jboss.org/jira/browse/JBSEAM-4196
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.1.GA
Reporter: Elias Ross
See this forum post: http://seamframework.org/Community/InfiniteLoopBugInJBPMIntegration
Stack trace (repeating):
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)
at org.jboss.seam.Component.callComponentMethod(Component.java:2211)
at org.jboss.seam.Component.unwrap(Component.java:2237)
at org.jboss.seam.Component.getInstance(Component.java:2004)
at org.jboss.seam.Component.getInstance(Component.java:1967)
at org.jboss.seam.Component.getInstance(Component.java:1961)
at org.jboss.seam.Component.getInstance(Component.java:1934)
at org.jboss.seam.Component.getInstance(Component.java:1929)
at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:229)
at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:217)
at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:68)
at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
at org.jboss.seam.Component.getInstance(Component.java:1949)
at org.jboss.seam.Component.getInstance(Component.java:1944)
at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:112)
at org.jboss.seam.transaction.EntityTransaction.initEntityManager(EntityTransaction.java:67)
at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:79)
at org.jboss.seam.util.Work.workInTransaction(Work.java:42)
at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
etc.
There is code to reproduce the issue there.
--
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
14 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2164) Improve exception chaining in SeamLoginModule
by Yannick Lazzari (JIRA)
Improve exception chaining in SeamLoginModule
---------------------------------------------
Key: JBSEAM-2164
URL: http://jira.jboss.com/jira/browse/JBSEAM-2164
Project: JBoss Seam
Issue Type: Feature Request
Reporter: Yannick Lazzari
Priority: Minor
This an improvement request in the SeamLoginModule class to properly chain exceptions when throwing LoginExceptions in the login method. See code below:
public boolean login()
throws LoginException
{
try
{
NameCallback cbName = new NameCallback("Enter username");
PasswordCallback cbPassword = new PasswordCallback("Enter password", false);
// Get the username and password from the callback handler
callbackHandler.handle(new Callback[] { cbName, cbPassword });
username = cbName.getName();
}
catch (Exception ex)
{
log.error("Error logging in", ex);
throw new LoginException(ex.getMessage());
}
MethodExpression mb = Identity.instance().getAuthenticateMethod();
if (mb==null)
{
throw new IllegalStateException("No authentication method defined - please define <security:authenticate-method/> for <security:identity/> in components.xml");
}
try
{
return (Boolean) mb.invoke();
}
catch (Exception ex)
{
log.error("Error invoking login method", ex);
throw new LoginException(ex.getMessage());
}
}
In both instances where a LoginException is thrown, only the message is passed to the constructor of the LoginException. I know that the LoginException does not overload the constructor to pass a cause directly but we can use the initCause method instead:
LoginException loginException = new LoginException();
loginException.initCause(originalException);
throw loginException;
If people use typed exceptions in their authenticator method to express different reasons why the login attempt failed, it's impossible right now to get that original exception.
--
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
14 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4211) Addition of footnotes
by Robert Morse (JIRA)
Addition of footnotes
---------------------
Key: JBSEAM-4211
URL: https://jira.jboss.org/jira/browse/JBSEAM-4211
Project: Seam
Issue Type: Feature Request
Components: PDF
Environment: Seam 2.1.2.CR2, Mac OS X
Reporter: Robert Morse
Priority: Minor
It would be great to have the ability to footnote a paragraph, cell, or text and have the footnote appear on the same page as the referencing tag. This is different from a footer which repeats on every page. As a suggestion, I would embed some special footnote character within the text that would be replaced by the appropriate footnote number / letter. Then create a new <p:footnote> tag that would contain the actual footnote. It would look something like:
<p:paragraph>
<p:text value = "this is the word ¹ that gets footnoted"/>
<p:footnote value = "And this is the footnote that gets positioned at the bottom of the same page"/>
</p:paragraph>
--
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
14 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4170) Concurrent call to conversation Exception for first login
by Hunter Lee (JIRA)
Concurrent call to conversation Exception for first login
---------------------------------------------------------
Key: JBSEAM-4170
URL: https://jira.jboss.org/jira/browse/JBSEAM-4170
Project: Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.1.2.CR1
Environment: jboss-4.2.3.GA / jdk1.5.0_16 / Win XP sp3
Reporter: Hunter Lee
Priority: Blocker
1. Clean Browser cookies
2. Type an URL that need to login without cid
3. Enter login account and password.
4. expect go to the typed URL directly, but throw an Exception:
11:33:33,921 WARN [SeamPhaseListener] uncaught exception, passing to exception handler
org.jboss.seam.ConcurrentRequestTimeoutException: Concurrent call to conversation
at org.jboss.seam.core.Manager.restoreAndLockConversation(Manager.java:641)
at org.jboss.seam.core.Manager.restoreConversation(Manager.java:603)
at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:392)
at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:230)
at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.jboss.seam.web.RewriteFilter.process(RewriteFilter.java:98)
at org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:57)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:532)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
11:33:33,937 ERROR [CachedConnectionValve] Application error: default did not complete its transaction
--
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
14 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4228) expose rewrite rules
by Duncan Stockdill (JIRA)
expose rewrite rules
--------------------
Key: JBSEAM-4228
URL: https://jira.jboss.org/jira/browse/JBSEAM-4228
Project: Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.1.2.CR2
Reporter: Duncan Stockdill
The RewriteFilter translates the requests to the internal view URLs and dispatches the request with the rewritten URL. e.g.
RequestDispatcher dispatcher = request.getRequestDispatcher(newPath);
dispatcher.forward(request, response);
As a result, the original URL is lost to processing further down the chain. In some cases it's useful to have access the original URL.
Potentially the URL could be stored and made available as an injectable component, but a more generic answer would be to expose the rewrite rules so an internal view can be converted to an external URL programatically. e.g. add matchPatterns or rewritePath to Pages class.
--
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
14 years, 11 months