[jboss-user] [JBoss Seam] - @Conversational vs. @Remove
Just for completeness, I've added @Conversational to my conversational beans. Now I got: | 10:45:44,162 WARN [Component] Exception calling stateful session bean default @Remove method: versionBearbeiten | javax.ejb.EJBException: org.jboss.seam.NoConversationException: no long-running conversation for @Conversational bean: versionBearbeiten | Is the @Conversational checking a little bit too rigid, or have I done something wrong? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4121741#4121741 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4121741 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Conversational ?
Hi, we have a problem that used to be addressed by @Conversational. However with Seam 2 I am not sure how to address it. The scenario: I have a current long running conversation. During this conversation a page (view.xhtml) is displayed. view.xhtml contains an s:link with an action in a stateful bean: s:link action=#{contentManagementBean.editContent} | id=editContents/ Based on the outcome of editContent the pages.xml displays the appropriate edit page. The stateful bean has an @In(required=true) | @In(required = true,value=selectedGroupingForView) | @Out(required=true) | private Grouping selectedGroupingForView; However, a problem occurs when the long running conversation expires, the various elements in the conversation context are removed, and when the uses then selects the s:link. Obviously the stateful bean cant inject the required values, which results an exception. Is there anyway to protect/prevent this type of problem ? Thanks Louis | Caused by org.jboss.seam.RequiredException with message: In attribute requires non-null value: contentManagementBean.selectedGroupingForView | | org.jboss.seam.Component.getValueToInject(Component.java:2164) | org.jboss.seam.Component.injectAttributes(Component.java:1594) | org.jboss.seam.Component.inject(Component.java:1415) | org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45) | org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:45) | org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31) | org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:54) | org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42) | org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26) | org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27) | org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106) | org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50) | sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source) | sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | java.lang.reflect.Method.invoke(Method.java:597) | org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) | org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) | org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57) | org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) | org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) | org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126) | org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195) | org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) | org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83) | org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) | org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106) | org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) |
[jboss-user] [JBoss Seam] - Conversational ifNotBegunOutcome
I think this should be removed/changed in Seam manual as ifNotBegunOutcome is deprecated? anonymous wrote : | @Conversational(ifNotBegunOutcome=error) | Specifies that a conversation scope component is conversational, meaning that no method of the component | can be called unless a long-running conversation started by this component is active (unless the method | would begin a new long-running conversation). | Br, Juha View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4013030#4013030 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4013030 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Conversational(initiator=true) when immediate=true
Hello fourm, seam 1.1.0.GA jboss-4.0.5.GA ajax4jsf-1.0.5 Facelets I am trying to use the Conversational(initiator=true) mechanism:. I have two methods in an editor bean, an SFSB that is in a nested conversation. public String apply(); public String cancel(); I want to stop someone from back buttoning into an editor page re-invoking these methods a second time. I found that the Conversational(initiator=true) works fine for the apply() method, but is not enforced on the cancel() method. This is because my cancel button has an immediate=true set on it I verified this by removing it. I guess the check is not applied or does not work in the Apply Req Values phase? So, is there a any way I can emulate the initiator=true check in the cancel() method? Also, on a similar note, I see from the docs that the usage of Conversational(ifNoBegunOutcome=xxx, initiator=true) etc. is deprecated in favour of use no-conversation-view-id in pages.xml The no-conversation-view-id works for me in pages.xml, but I can't figure out how to specify the initiator=true in pages.xml. I looked in the Page.java don't see any ref. to it there. Was it over-looked? Thanks, PdP View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4010587#4010587 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4010587 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - conversational bean not always redirecting to ifNotBegunOutc
This is probably my misunderstanding of the phases and conversations, but here it goes We have a seam app with a lot of @Conversational beans. Many of these beans support wizards. If a user is on the nth page of one of the wizards, and the server was just bounced, I would expect the Next button to automatically redirect them to the ifNotBegunOutcome of the class associated with the Next buttons action method. However, in most scenarios, it lets the Next go through and the user is shown a nonsense wizard page filled with blanks. It appears that the problem has to do with the sequence of the the Conversational check and the instantiation of the components associated with the form post. Conversational checks only occur in the INVOKE_APPLICATION phase. If the Conversational bean does not exist in the conversation scope, it will redirect to the ifNotBegunOutcome. However, during the APPLY_REQUEST_VALUES phase, the Conversational beans have already bean instantiated by the SeamVariableResolver. For instance, in the log below, we are demonstrating what happens when we click the Next button on an action that uses the worksheetBean. I had just restarted the server (and thus the conversation was gone). Because the worksheetBean is instantiated by the SeamVariableResolver, the intended Conversational check never occurs. What can we do about this? | 2006-09-12 14:40:21,162 DEBUG [com.app.web.listener.LogPhaseListener] BEFORE: APPLY_REQUEST_VALUES(2) | 2006-09-12 14:40:21,240 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, [EMAIL PROTECTED], [EMAIL PROTECTED] url=null ,addedOrder=0} | 2006-09-12 14:40:21,240 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, [EMAIL PROTECTED], [EMAIL PROTECTED] url=null ,addedOrder=0} | 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: userPrincipal | 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: userPrincipal | 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component | 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: userPrincipal | 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: userPrincipal | 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component | 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: applicationMessages | 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.Component] instantiating Seam component: applicationMessages | 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component | 2006-09-12 14:40:21,287 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, [EMAIL PROTECTED], [EMAIL PROTECTED] url=null ,addedOrder=0} | 2006-09-12 14:40:21,287 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: worksheetBean | 2006-09-12 14:40:21,287 DEBUG [org.jboss.seam.Component] instantiating Seam component: worksheetBean | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3971106#3971106 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3971106 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user