[JBoss Seam] - conversational bean not always redirecting to ifNotBegunOutc
by knaas
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, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@b5d935, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@aacf63{ url=null ,addedOrder=0}
| 2006-09-12 14:40:21,240 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@b5d935, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@15772e{ 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, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@b5d935, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1831292{ 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=bb&op=viewtopic&p=3971106#3971106
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971106
19 years, 7 months
[JBoss Portal] - Re: MyFaces 1.1.2 Portal 2.4
by alain_fr
maybe it can help
my web.xml
<?xml version="1.0"?>
| <!DOCTYPE web-app PUBLIC
| "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
| "http://java.sun.com/dtd/web-app_2_3.dtd">
|
| <web-app>
|
| <context-param>
| <param-name>javax.faces.CONFIG_FILES</param-name>
| <param-value>
| /WEB-INF/faces-config.xml
| </param-value>
| </context-param>
|
|
| <listener>
| <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
| </listener>
|
| <listener>
| <listener-class>de.mindmatters.faces.spring.config.ConfigLoaderListener</listener-class>
| </listener>
|
| <listener>
| <listener-class>de.mindmatters.faces.spring.context.ContextLoaderListener</listener-class>
| </listener>
|
| <servlet>
| <servlet-name>dispatcher</servlet-name>
| <servlet-class>de.mindmatters.faces.spring.context.servlet.DispatcherServlet</servlet-class>
| </servlet>
|
|
|
|
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.jsf</url-pattern>
| </servlet-mapping>
|
|
| <welcome-file-list>
| <welcome-file>index.jsp</welcome-file>
| </welcome-file-list>
|
| </web-app>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971103#3971103
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971103
19 years, 7 months
[Tomcat, HTTPD, Servlets & JSP] - Weird error after Jboss sits idle
by smithbstl
I get a weird error after JBoss sits idle for a period of time.
2006-09-12 12:36:40,984 ERROR [STDERR] Exception in thread "AWT-EventQueue-0"
| 2006-09-12 12:36:40,984 ERROR [STDERR] java.lang.NullPointerException
| 2006-09-12 12:36:40,984 ERROR [STDERR] at sun.awt.Win32GraphicsEnvironment.displayChanged(Win32GraphicsEnvironment.java:109)
| 2006-09-12 12:36:40,984 ERROR [STDERR] at sun.awt.windows.WToolkit$4.run(WToolkit.java:698)
| 2006-09-12 12:36:40,984 ERROR [STDERR] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
| 2006-09-12 12:36:40,984 ERROR [STDERR] at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
| 2006-09-12 12:36:40,984 ERROR [STDERR] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
| 2006-09-12 12:36:40,984 ERROR [STDERR] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
| 2006-09-12 12:36:40,984 ERROR [STDERR] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
| 2006-09-12 12:36:40,984 ERROR [STDERR] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
| 2006-09-12 12:36:40,984 ERROR [STDERR] at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
They almost look like swing errors due them being awt toolkit errors. I am not sure where to start with this. I am running an ADF Faces application if that makes any difference.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971101#3971101
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971101
19 years, 7 months
[Performance Tuning] - Jar Isolation Not Working
by wcydaip
All,
I've been up and down this road many times, but, I've finally come to the conclusion that the Jar Isolation mechanism posted in the documents does not work. Here's why:
I've flipped the flag UseJbossWebLoader found in server\default\deploy\jbossweb-tomcat55.sar\META-INF\jboss-service.xml to read:
| <attribute name="UseJBossWebLoader">false</attribute>
|
I have two apps which require three of the same jar files. If both apps exist in the deploy directory at the same time and JBoss is restarted I get an array of LinkageError's and ClassCastException errors.
However, if one single app containing the three redundant jar files is deployed alone. And if that app is navigated completly through. Then if the next app is deployed the applications work.
This just leads me to believe that the isolation isn't handled correctly and that app2 is actually using classes from the app1 deployment.
What do you think?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971093#3971093
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971093
19 years, 7 months