[JBoss JIRA] Created: (WELD-730) WeldApplication should not assume FacesContext is always active
by Dan Allen (JIRA)
WeldApplication should not assume FacesContext is always active
---------------------------------------------------------------
Key: WELD-730
URL: https://jira.jboss.org/browse/WELD-730
Project: Weld
Issue Type: Bug
Components: Servlet Container Support
Affects Versions: 1.1.0.Beta1
Reporter: Dan Allen
Fix For: 1.1.0.Beta2
WeldApplication uses a forwarding wrapper around the delegate JSF Application object in order to get around the fact that BeanManager may not have been initialized at the time JSF is initializing. However, it assumes that the first use of Application will be during a faces request, where FacesContext is available. However, the JSF Application object is permitted to be accessed outside of the faces lifecycle (such as in a Servlet filter). When this occurs, a NullPointerException in WeldApplication results.
WeldApplication should skip the BeanManager lookup if the FacesContext is null.
private BeanManager beanManager()
{
FacesContext facesContext;
if (beanManager != null && (facesContext = FacesContext.getCurrentInstance()) != null) {
// lookup BeanManager
}
}
--
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
14 years
[JBoss JIRA] Created: (WELD-754) Fix weld parent pom repository list
by Sivakumar Thyagarajan (JIRA)
Fix weld parent pom repository list
-----------------------------------
Key: WELD-754
URL: https://jira.jboss.org/browse/WELD-754
Project: Weld
Issue Type: Bug
Reporter: Sivakumar Thyagarajan
The current weld parent pom (org.jboss.weld:weld-parent:pom:17) has a reference to the public repository http://repository.jboss.org/nexus/content/groups/public with the id "jboss-snapshots-repository".
As per the documentation in http://community.jboss.org/wiki/MavenRepository, the public repository group has both snapshots and releases.
- If a snapshots-only repository was only intended, could we use the /snapshots hosted repository available at https://repository.jboss.org/nexus/content/repositories/snapshots/.
- On the other hand if the /public repository group was intended (ie both releases and snapshot), since the public repo group contains both releases and snapshots, could we fix line 41 and line 55 to enable releases?
https://github.com/weld/parent/blob/17/pom.xml#L55
We had an issue recently because of the disabling of releases in line 55. Maven 2.0.10 is the minimum maven version for weld. When GlassFish added the JBoss public repository group to its nexus repo, if I used maven 2.0.10, when a maven artifact from the JBoss repo was obtained, all references from that maven artifact used the repository definition in weld-parent:pom. Since releases were disabled in this repo definition, the released artifact residing in JBoss repo could not be found. Maven 2.2.1 fixes this issue(and also consults the repo definition in GlassFish) and we use 2.2.1 now. However, it would be useful to fix this discrepancy in weld-parent POM. Thanks.
--
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
14 years
[JBoss JIRA] Created: (WELD-743) Serialization failure for Events injected into non-contextual instances
by Clint Popetz (JIRA)
Serialization failure for Events injected into non-contextual instances
-----------------------------------------------------------------------
Key: WELD-743
URL: https://jira.jboss.org/browse/WELD-743
Project: Weld
Issue Type: Bug
Affects Versions: 1.1.0.Beta1
Reporter: Clint Popetz
If a class has an @Inject Event, and a non-contextual instance of that class is injected programmatically via the BeanManager API, the resulting proxies will fail with a NPE when serialized.
{noformat}
java.lang.NullPointerException
at org.jboss.weld.serialization.ContextualStoreImpl.putIfAbsent(ContextualStoreImpl.java:109)
at org.jboss.weld.injection.WeldInjectionPoint$WeldInjectionPointSerializationProxy.<init>(WeldInjectionPoint.java:43)
at org.jboss.weld.injection.FieldInjectionPoint$SerializationProxy.<init>(FieldInjectionPoint.java:197)
at org.jboss.weld.injection.FieldInjectionPoint.writeReplace(FieldInjectionPoint.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:1032)
{noformat}
--
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
14 years