[JBoss Seam] - Preprocessing constraints for pages
by dmitriy.lapko
Is there any convenient ways to check some constraints before processing the request to any view? Something like but not so bounded to access rights. Something like navigation rule but before execute action phase.
Simple example, and ALL needs it:
I want to redirect already loginned user to welcome page, if he tries to visit login page. No error messages, no warnings.
I don't want to create special user rights for this or add page action which will check if user is already loginned and then process special outcome from this action - this inforces me to do something that can break my previous logic.
So, I just want to add to some pre-condition with navigation which should be done if this condition is true.
Like:
<page view-id="/item.xhtml">
| <navigation>
| <rule if-before="#{indentity.loggedIn}">
| <redirect view-id="/welcome.html"/>
| </rule>
| </page>
|
How can I do it in Seam 2.0 GA?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108373#4108373
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108373
18 years, 5 months
[JBossWS] - Re: returning array undefined in web service
by alessio.soldano@jboss.com
"mckeno" wrote : The code looks messy, but I can't find the edit functionality in this forum ??!!?? so I did a re post....
Sorry, users are not allowed to edit any post on the forum.
anonymous wrote : Hi all I am having this problem, not sure whether it is related to jboss web service or the client site application:
|
| I am writing a web service inside EJB container:
|
| | @Stateless
| | @WebService(name = "Mojo", targetNamespace = "http://myservice.com/services", serviceName = "CoolService")
| | @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
| | public class MyWebService {
| |
| | @WebMethod
| | @WebResult
| | public int[] getNumber(@WebParam(name = "userName") String sth) {
| | int[] number = new int[3];
| | number[0] = 7;
| | number[1] = 2;
| | number[2] = 3;
| |
| | log.info("ARRAY METHOD CALLED " + number.length);
| | return number;
| | }
| |
| | @WebMethod
| | @WebResult
| | public int getNum(int param) {
| | int result = param + 2;
| | return result ;
| | }
| |
| | }
|
| The getNum() method works fine, but the getNumber() always return undefined result(I am calling the web service using Web Sevice Connector in Flash application). So I am wondering whether I need any specific annotation for the array returning methods?
Please post here your configuration (version of JBoss & JBossWS) as long as the your wsdl. Did you try capturing the message being exchanged? does it contain the array's values?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108369#4108369
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108369
18 years, 5 months
[JBoss Seam] - Ajax and Pageflow very slow
by pietermartin
Hi,
I am using the pageflow and normal s:decorate with ajax pattern as in the examples.
On the onblur event huge amounts of code seems to execute (seen in server.log) which takes so long that subsequest onblur events gets a concurrent problem
anonymous wrote :
| summary=(The conversation ended, timed out or was processing another request), detail=(The conversation ended, timed out or was processing another request)
Here is some of the logs from server.log generated on a single onblur ajax event.
|
| 2007-11-28 12:24:16,052 DEBUG [org.ajax4jsf.webapp.BaseFilter] Filter start request processing at 11/28/07 12:24 PM for uri:
| /web/signyouup/capturePhoneDetails.seam
| 2007-11-28 12:24:16,052 DEBUG [org.ajax4jsf.webapp.BaseFilter] Incoming request has Content-Type header with character encodin
| g UTF-8
| 2007-11-28 12:24:16,052 DEBUG [org.ajax4jsf.webapp.BaseFilter] Filter request output to XML
| 2007-11-28 12:24:16,052 DEBUG [org.ajax4jsf.webapp.BaseXMLFilter] XML filter service start processing request
| 2007-11-28 12:24:16,053 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase RESTORE_VIEW 1
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.contexts.FacesLifecycle] >>> Begin JSF request
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.transaction.transaction
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.transaction.transaction
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.transaction.transaction
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-11-28 12:24:16,053 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.trans
| action.transaction
|
|
| .... same output for hundreds of lines
|
|
| 2007-11-28 12:24:16,110 DEBUG [org.jboss.seam.Component] seam component not found: org.jboss.seam.transaction.required
| 2007-11-28 12:24:16,110 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.bpm.processInstance
| 2007-11-28 12:24:16,110 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.bpm.processInstance
| 2007-11-28 12:24:16,110 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.bpm.processInstance
| 2007-11-28 12:24:16,110 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp
| .interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp
| .interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.Component] seam component not found: org.jboss.seam.framework.required
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.bpm.processInstance
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.bpm.processInstance
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.bpm.processInstance
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp
| .interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp
| .interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.Component] seam component not found: org.jboss.seam.web.required
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.bpm.processInstance
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.bpm.processInstance
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.bpm.processInstance
| 2007-11-28 12:24:16,111 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp
| .interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
|
|
| .... same output for hundreds of lines
|
|
| 2007-11-28 12:24:16,751 DEBUG [org.jbpm.svc.Services] executing default save operations
| 2007-11-28 12:24:16,751 DEBUG [org.jbpm.svc.save.HibernateSaveOperation] saving process instance
| 2007-11-28 12:24:16,751 DEBUG [org.jbpm.svc.save.SaveLogsOperation] flushing logs to logging service.
| 2007-11-28 12:24:16,751 DEBUG [org.jbpm.svc.save.CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@9
| 05b91'
| 2007-11-28 12:24:16,751 DEBUG [org.jbpm.svc.Services] executing default save operations
| 2007-11-28 12:24:16,751 DEBUG [org.jbpm.svc.save.HibernateSaveOperation] saving process instance
| 2007-11-28 12:24:16,751 DEBUG [org.jbpm.svc.save.SaveLogsOperation] flushing logs to logging service.
| 2007-11-28 12:24:16,751 DEBUG [org.jbpm.svc.save.CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@9
| 05b91'
| 2007-11-28 12:24:16,751 DEBUG [org.jbpm.svc.Services] executing default save operations
| 2007-11-28 12:24:16,752 DEBUG [org.jbpm.svc.save.HibernateSaveOperation] saving process instance
| 2007-11-28 12:24:16,752 DEBUG [org.jbpm.svc.save.SaveLogsOperation] flushing logs to logging service.
| 2007-11-28 12:24:16,752 DEBUG [org.jbpm.svc.save.CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@9
| 05b91'
|
|
| .... same output for hundreds of lines
|
|
| 2007-11-28 12:24:19,225 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase RENDER_RESPONSE 6
| 2007-11-28 12:24:19,225 DEBUG [org.ajax4jsf.webapp.BaseXMLFilter] Process response to well-formed XML for AJAX XMLHttpRequest
| parser
| 2007-11-28 12:24:19,226 DEBUG [org.ajax4jsf.webapp.tidy.TidyParser] Print output as XML
| 2007-11-28 12:24:19,226 DEBUG [org.ajax4jsf.webapp.tidy.TidyParser] Message for HTML parsing : missing <!DOCTYPE> declaration
| 2007-11-28 12:24:19,226 DEBUG [org.ajax4jsf.webapp.tidy.TidyParser] Message for HTML parsing : inserting missing 'title' eleme
| nt
| 2007-11-28 12:24:19,226 DEBUG [org.ajax4jsf.webapp.tidy.TidyParser] Message for HTML parsing : meta isn't allowed in <body> el
| ements
| 2007-11-28 12:24:19,227 DEBUG [org.ajax4jsf.webapp.tidy.TidyParser] Message for HTML parsing : meta isn't allowed in <body> el
| ements
| 2007-11-28 12:24:19,228 DEBUG [org.ajax4jsf.webapp.BaseXMLFilter] Parsing html total time 2ms
| 2007-11-28 12:24:19,228 DEBUG [org.ajax4jsf.webapp.BaseFilter] Finished request processing total time 721ms for uri: /web/sign
| youup/capturePhoneDetails.seam
|
|
|
This single ajax onblur request took 721ms.
It seems that Seam needs to work far to hard during the ajax request. Going to the bpm hundreds of times instantiating components hundreds of time etc.
I note that the dvd example does not use ajax.
Is this a know issue?
I am using seam-2.0.0.GA and jboss-4.2.2.GA
Cheers
Pieter
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108366#4108366
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108366
18 years, 5 months