[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1383) Add conversation propogation="clone" ability
by Michael Youngstrom (JIRA)
Add conversation propogation="clone" ability
--------------------------------------------
Key: JBSEAM-1383
URL: http://jira.jboss.com/jira/browse/JBSEAM-1383
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 1.2.1.GA
Reporter: Michael Youngstrom
I think the ability to clone a conversation would be useful.
Currently if I have an s:link and I do an "open in new window" on that link I now have 2 windows linked to the same conversation which may produce undesirable side effects to the user.
So the idea is with s:link or other "GET" types of requests where the user might be inclined to do an "Open in new Window" type of operation we add the ability to clone the conversation when executed. If applied to an s:link the conversation would always be cloned when that link is executed. That way if the user did do an "Open in new window" each window would have 2 independent conversations.
This would obviously have the side effect of an orphaned conversation if the user didn't do an "open in new window or tab" so the user would have to weigh the cost of creating orphaned conversations against maintaining the Conversation per window type of semantics this feature would provide.
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1745) SpringTransaction fails with HibernateJpaDialect and FlushMode.MANUAL
by Darryl Smith (JIRA)
SpringTransaction fails with HibernateJpaDialect and FlushMode.MANUAL
----------------------------------------------------------------------
Key: JBSEAM-1745
URL: http://jira.jboss.com/jira/browse/JBSEAM-1745
Project: JBoss Seam
Issue Type: Bug
Components: Spring
Reporter: Darryl Smith
When using flushMode = MANUAL with org.springframework.orm.jpa.vendor.HibernateJpaDialect, the flushMode is changed to AUTO when beginning transaction
SessionImpl.setFlushMode(FlushMode) line: 1286
HibernateSessionProxy.setFlushMode(FlushMode) line: 381
SeamHibernateJpaDialect(HibernateJpaDialect).beginTransaction(EntityManager, TransactionDefinition) line: 60
JpaTransactionManager.doBegin(Object, TransactionDefinition) line: 326
JpaTransactionManager(AbstractPlatformTransactionManager).getTransaction(TransactionDefinition) line: 350
SpringTransaction.begin() line: 74
Unless the transaction definition is set to readOnly spring will change the flushMode to manual
HibernateJpaDialect:45
--------------------------------
public Object beginTransaction(EntityManager entityManager, TransactionDefinition definition)
throws PersistenceException, SQLException, TransactionException {
super.beginTransaction(entityManager, definition);
Session session = getSession(entityManager);
FlushMode flushMode = session.getFlushMode();
FlushMode previousFlushMode = null;
if (definition.isReadOnly()) {
// We should suppress flushing for a read-only transaction.
session.setFlushMode(FlushMode.MANUAL);
previousFlushMode = flushMode;
}
else {
// We need AUTO or COMMIT for a non-read-only transaction.
if (flushMode.lessThan(FlushMode.COMMIT)) {
session.setFlushMode(FlushMode.AUTO);
previousFlushMode = flushMode;
}
}
return new SessionTransactionData(session, previousFlushMode);
}
Perhaps SpringTransaction should set should pass readOnly transaction def to Spring when the flushMode is manual.
Current Workaround: use DefaultJpaDialect
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2042) quartz example doesn't report errors
by Norman Richards (JIRA)
quartz example doesn't report errors
------------------------------------
Key: JBSEAM-2042
URL: http://jira.jboss.com/jira/browse/JBSEAM-2042
Project: JBoss Seam
Issue Type: Bug
Components: Examples
Affects Versions: 2.0.0.CR1
Reporter: Norman Richards
Priority: Minor
Fix For: 2.0.1.GA
It would be nice if we could capture/report scheduler errors. In this case I accidentally entered the 12th business day of the week.
10:27:31,007 ERROR [STDERR] org.quartz.SchedulerException: Based on configured schedule, the given trigger will never fire.
10:27:31,008 ERROR [STDERR] at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:698)
10:27:31,008 ERROR [STDERR] at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:255)
10:27:31,008 ERROR [STDERR] at org.jboss.seam.async.QuartzDispatcher.scheduleWithQuartzService(QuartzDispatcher.java:218)
10:27:31,008 ERROR [STDERR] at org.jboss.seam.async.QuartzDispatcher.scheduleInvocation(QuartzDispatcher.java:125)
10:27:31,008 ERROR [STDERR] at org.jboss.seam.async.QuartzDispatcher.scheduleInvocation(QuartzDispatcher.java:45)
10:27:31,008 ERROR [STDERR] at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:38)
10:27:31,008 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
10:27:31,008 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
10:27:31,008 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
10:27:31,008 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
10:27:31,008 ERROR [STDERR] at org.jboss.seam.example.quartz.PaymentProcessor_$$_javassist_4.schedulePayment(PaymentProcessor_$$_javassist_4.java)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.example.quartz.PaymentController.saveAndScheduleNthBusinessDay(PaymentController.java:68)
10:27:31,009 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:27:31,009 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
10:27:31,009 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
10:27:31,009 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.util.Work.workInTransaction(Work.java:40)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
10:27:31,009 ERROR [STDERR] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
10:27:31,010 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
10:27:31,010 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
10:27:31,010 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
10:27:31,010 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
10:27:31,010 ERROR [STDERR] at org.jboss.seam.example.quartz.PaymentController_$$_javassist_3.saveAndScheduleNthBusinessDay(PaymentController_$$_javassist_3.java)
10:27:31,010 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:27:31,010 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
10:27:31,010 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
10:27:31,010 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
10:27:31,010 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
10:27:31,010 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
10:27:31,010 ERROR [STDERR] at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
10:27:31,010 ERROR [STDERR] at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
10:27:31,010 ERROR [STDERR] at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
10:27:31,010 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
10:27:31,010 ERROR [STDERR] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
10:27:31,010 ERROR [STDERR] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
10:27:31,010 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:383)
10:27:31,010 ERROR [STDERR] at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
10:27:31,010 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
10:27:31,011 ERROR [STDERR] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
10:27:31,011 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
10:27:31,011 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
10:27:31,011 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
10:27:31,011 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
10:27:31,011 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
10:27:31,011 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
10:27:31,011 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
10:27:31,012 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:27:31,012 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
10:27:31,012 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
10:27:31,012 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:27:31,012 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
10:27:31,012 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
10:27:31,012 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
10:27:31,012 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
10:27:31,012 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
10:27:31,012 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
10:27:31,012 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
10:27:31,012 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
10:27:31,012 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
10:27:31,012 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
10:27:31,012 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
10:27:31,012 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
10:27:31,012 ERROR [STDERR] at java.lang.Thread.run(Thread.java:613)
--
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, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2165) Authenticator method invoked twice when login fails
by Yannick Lazzari (JIRA)
Authenticator method invoked twice when login fails
---------------------------------------------------
Key: JBSEAM-2165
URL: http://jira.jboss.com/jira/browse/JBSEAM-2165
Project: JBoss Seam
Issue Type: Bug
Components: Security
Affects Versions: 2.0.0.CR3
Reporter: Yannick Lazzari
Priority: Minor
The default behaviour of the isLoggedIn method in the Identity class is to pass the attemptLogin flag to true. Because of that, when authentication fails, it always calls the authenticator method twice. See the code of the authenticate() method below:
public void authenticate()
throws LoginException
{
// If we're already authenticated, then don't authenticate again
if (!isLoggedIn())
{
authenticate( getLoginContext() );
}
}
public boolean isLoggedIn(boolean attemptLogin)
{
if (!authenticating && attemptLogin && getPrincipal() == null && isCredentialsSet() &&
Contexts.isEventContextActive() &&
!Contexts.getEventContext().isSet(LOGIN_TRIED))
{
Contexts.getEventContext().set(LOGIN_TRIED, true);
quietLogin();
}
// If there is a principal set, then the user is logged in.
return getPrincipal() != null;
}
public void authenticate(LoginContext loginContext)
throws LoginException
{
try
{
authenticating = true;
preAuthenticate();
loginContext.login();
postAuthenticate();
}
finally
{
authenticating = false;
}
}
The first reference to isLoggedIn tries to log the user. When it fails, it goes in the if block and tries to authenticate the user for a second time before failing again. I could fix this on my end by overriding the isLoggedIn() method in my own Identity component and passing the attemptLogin flag to false. Before doing so, I thought that perhaps a fix could be done at a higher level, i.e. in the Identity class of Seam itself. The way I see it, 2 things could be done:
1. In the authenticate() method, invoke the isLoggedIn method with false.
2. Look into the management of the authenticating class member; there might be something wrong. It's only set to true at the beginning of the authenticate(LoginContext) method. If you look at the logic in the isLoggedIn(boolean) method, when it winds up being invoked at the beginning of the authenticate(), the authenticating flag is false, the attemptLogin flag is true, I don't have a principal yet (I'm trying to login for the first time) and my credentials are set (the user just provided his username and password).
--
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, 11 months