[JBoss JIRA] Created: (SEAMCRON-6) Can we use @RequestScoped for @Asynchronous methods? How?
by Peter Royle (JIRA)
Can we use @RequestScoped for @Asynchronous methods? How?
---------------------------------------------------------
Key: SEAMCRON-6
URL: https://issues.jboss.org/browse/SEAMCRON-6
Project: Seam Cron
Issue Type: Task
Reporter: Peter Royle
Assignee: Peter Royle
This is one for investigation some time. It came up in this IRC chat:
IRC Transcript:
[11:10am] johnament: request scoped won't be active in a background thread.
[11:10am] PeteRoyle: ah true cos it's threadlocal?
[11:10am] johnament: which?
[11:11am] PeteRoyle: request scoped implementation
[11:11am] PeteRoyle: won't work in a background thread because the implementation of request scope uses threadlocal, is that right?
[11:11am] johnament: its essentially an HTTP request
[11:12am] PeteRoyle: right
[11:12am] PeteRoyle: I think the use case is valid though, do you agree?
[11:13am] johnament: its valid, but it breaks the CDI model, so to say
[11:13am] johnament: because you want to make your contextual objects available outside of your context
[11:14am] PeteRoyle: right yeah that makes sense
[11:14am] PeteRoyle: the request might be over
[11:14am] johnament: the only thing really available is going to be dependent or application scoped
[11:15am] johnament: the bigger question - which request?
[11:15am] PeteRoyle: well the one from which the @Asynch method was called - assuming we could hang onto it
[11:15am] PeteRoyle: hang onto the request that is
[11:16am] PeteRoyle: eg: a controller which @Injects a @RequestScoped Thing, then calls an @Asynchronous method
[11:17am] johnament: the only way it would work is to make request scope extend through your @asynch process is over.
[11:18am] PeteRoyle: The interceptor would have access to the correct @RequestScope. It would need to replicate it into the new thread. Would that be possible do you think?
[11:18am] johnament: i don't know how plausible/possible that even is.
[11:18am] PeteRoyle: yeah. I might leave that as something for investigation later. I'll JIRA it
[11:18am] johnament: jms does this by transporting the event over JMS, but loses the context.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (SEAMSECURITY-66) Separated API/IMPL jars do not allow compilation of the SimpleAuthenticator example
by Charles C (JIRA)
Separated API/IMPL jars do not allow compilation of the SimpleAuthenticator example
-----------------------------------------------------------------------------------
Key: SEAMSECURITY-66
URL: https://issues.jboss.org/browse/SEAMSECURITY-66
Project: Seam Security
Issue Type: Bug
Affects Versions: 3.0.0.Final
Reporter: Charles C
The SimpleAuthenticator example is not compilable with the separated API/IMPL jars, but instead must use either the combined jars, or the impl jar must be in the compile scope.
This seems like an incorrect factoring of impl vs api classes if the impl classes are required to compile a simple example of a custom authenticator. In particular, the PasswordCredential, BaseAuthenticator and SimpleUser classes are not available if only the API jar is used as a compile time dependency.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBSEAM-4621) Page Navigation exception after upgrading to JSF 2.0
by Sheng Gu (JIRA)
Page Navigation exception after upgrading to JSF 2.0
----------------------------------------------------
Key: JBSEAM-4621
URL: https://jira.jboss.org/jira/browse/JBSEAM-4621
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.2.1.CR1
Environment: Seam 2.2.1.CR1 + JSF 2.0 Sun
Reporter: Sheng Gu
Priority: Blocker
Fix For: 2.2.1.CR2
Hi there,
After upgrading to JSF2.0, I got the following exceptions. The login.xhtml and login.page.xml codes are listed as follows:
login.xhtml:
<h:commandButton value="LOGIN" action="#{identity.login}"/>
<h:commandButton value="SIGN UP!" action="register" immediate="true"/>
login.page.xml:
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
<end-conversation before-redirect="true" root="true"/>
<navigation from-action="#{identity.login}">
<rule if="#{identity.loggedIn}">
<end-conversation before-redirect="true" root="true"/>
<redirect view-id="/home.xhtml" />
</rule>
</navigation>
<navigation from-action="register">
<begin-conversation join="false"/>
<redirect view-id="/register.xhtml" />
</navigation>
</page>
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
at org.jboss.seam.mock.MockExternalContext.redirect(MockExternalContext.java:528)
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:220)
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:185)
at org.jboss.seam.faces.Navigator.redirect(Navigator.java:55)
at org.jboss.seam.faces.Navigator.redirect(Navigator.java:42)
at org.jboss.seam.exception.RedirectHandler.handle(RedirectHandler.java:51)
at org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
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.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:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
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:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
--
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
12 years, 9 months
[JBoss JIRA] Created: (SEAMSECURITY-71) Improve LDAP integration in general
by Thorsten Kunz (JIRA)
Improve LDAP integration in general
-----------------------------------
Key: SEAMSECURITY-71
URL: https://issues.jboss.org/browse/SEAMSECURITY-71
Project: Seam Security
Issue Type: Feature Request
Affects Versions: 3.0.0.Final
Reporter: Thorsten Kunz
As described in the forum thread right now getting LDAP integration to work is quite the project since there a features missing (in Seam Security as well as PicketLink IDM) and there is little to no documentation on how to enable Seam Security to use PicketLink IDM LDAP integration.
It would be very nice if Seam Security would have the same level of LDAP usability that Seam 2 has. At least it should be possible to enable simple LDAP integration by XML configuration only without the need to implement any classes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBSEAM-4722) Build seam2.5
by he youlin (JIRA)
Build seam2.5
-------------
Key: JBSEAM-4722
URL: https://jira.jboss.org/browse/JBSEAM-4722
Project: Seam
Issue Type: Feature Request
Affects Versions: 2.2.1.CR2
Reporter: he youlin
Priority: Optional
I think seam team should consider building seam 2.5 version so we can upgrade our old project to jsf2.0,ejb3.1,hibernate 3.6,beanvalidation,glassfish3 or jboss6 and get rid of hibernate3.2 validation and richfaces3 dependcy.
I have upgraded my old project a few months ago from seam2.2 to use jsf2.1,hibernate 3.6,beanvalidation,granite-seam21,spring3.05 under tomcat 7.0.5-dev and used in the production environment.I test it on glassfish v3.1 and jboss6 but not test ejb.
If considered i can provide my patch to seam team as a reference or push full source code to github with your team permission.
Please consider.
heyoulin
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] Created: (SEAMFACES-186) <s:validateForm>:
by Matija Mazi (JIRA)
<s:validateForm>:
------------------
Key: SEAMFACES-186
URL: https://issues.jboss.org/browse/SEAMFACES-186
Project: Seam Faces
Issue Type: Bug
Components: Validation & Conversion
Affects Versions: 3.0.2
Environment: JBAS 7
Mojarra 2.0.4
Reporter: Matija Mazi
Priority: Minor
This valitator:
{code:java}
@FacesValidator("passwordRepeatValidator")
@RequestScoped
@Named
public class PasswordRepeatValidator implements Validator {
@Inject @InputField private String password;
@Inject @InputField private String passwordRepeat;
@Override
public void validate(FacesContext facesContext, UIComponent uiComponent, Object o) throws ValidatorException {
if (!passwordRepeat.equals(password)) {
throw new ValidatorException(new FacesMessage("Passwords don't match."));
}
}
}
{code}
used like this:
{code:xhtml}
<h:form id="f">
<s:validateForm validatorId="passwordRepeatValidator"/>
<h:dataTable id="t" value="1" var="x">
<h:column id="c">
<h:inputSecret id="password"/>
<h:message for="password"/>
<h:inputSecret id="passwordRepeat"/>
<h:message for="passwordRepeat"/>
</h:column>
</h:dataTable>
<h:commandButton value="Submit"/>
</h:form>
{code}
fails with:
{code}
10:57:13,407 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[ppay-web].[/].[Faces Servlet]] (http--127.0.0.1-8080-2) Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalArgumentException: org.jboss.seam.component.UIValidateForm-- Could not locate component [f:password]
at org.jboss.seam.faces.component.FormValidationFieldProducer.findComponent(FormValidationFieldProducer.java:160) [seam-faces-impl-3.0.2.Final.jar:]
at org.jboss.seam.faces.component.FormValidationFieldProducer.getInputFieldValue(FormValidationFieldProducer.java:76) [seam-faces-impl-3.0.2.Final.jar:]
at sun.reflect.GeneratedMethodAccessor446.invoke(Unknown Source) [:1.6.0_24]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:169) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.bean.ProducerMethod$1.produce(ProducerMethod.java:149) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:361) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:67) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:693) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:775) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:138) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:875) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:887) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:182) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:54) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:176) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:142) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:170) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:339) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:122) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at com.example.PasswordRepeatValidator$Proxy$_$$_WeldClientProxy.validate(PasswordRepeatValidator$Proxy$_$$_WeldClientProxy.java) [backend-1.0.0-SNAPSHOT.jar:]
at org.jboss.seam.faces.component.UIValidateForm.validate(UIValidateForm.java:96) [seam-faces-api-3.0.2.Final.jar:]
at javax.faces.component.UIInput.executeValidate(UIInput.java:1209) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.faces.component.UIInput.processValidators(UIInput.java:698) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.faces.component.UIForm.processValidators(UIForm.java:244) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1085) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1165) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]
{code}
If the <h:dataTable><h:column> code is removed, it works as expected. It seems FormValidationFieldProducer is not able to locate the input components (password, passwordRepeat) if they are nested inside a NamingContainer (it this case a data table).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months