[JBoss JIRA] (WELD-1103) EJB using CMT demarcation with an injection point of type UserTransaction is not detected as definition error
by Martin Kouba (JIRA)
Martin Kouba created WELD-1103:
----------------------------------
Summary: EJB using CMT demarcation with an injection point of type UserTransaction is not detected as definition error
Key: WELD-1103
URL: https://issues.jboss.org/browse/WELD-1103
Project: Weld
Issue Type: Bug
Reporter: Martin Kouba
CDI spec *3.7. Additional built-in beans* states:
"If a Java EE component class has an injection point of type UserTransaction and qualifier @Default, and may not validly make use of the JTA UserTransaction according to the Java EE platform specification, the container automatically detects the problem and treats it as a definition error."
... and EJB 3.1 spec states:
*13.3.4 Enterprise Beans Using Container-Managed Transaction Demarcation*
"The enterprise bean's business methods, message listener methods, business method interceptor meth-
ods, lifecycle callback interceptor methods, or timeout callback methods must not attempt to obtain or
use the javax.transaction.UserTransaction interface. ..."
*16.12 UserTransaction Interface*
"The container must make the UserTransaction interface available to the enterprise beans that are
allowed to use this interface (only session and message-driven beans with bean-managed transaction
demarcation are allowed to use this interface) either through injection using the Resource annotation
or in JNDI under the name java:comp/UserTransaction, in addition to through the EJBContext
interface. ..."
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (WELD-1139) Business method interceptor bindings do not include bindings declared as meta-annotations of other interceptor bindings recursively
by Martin Kouba (JIRA)
Martin Kouba created WELD-1139:
----------------------------------
Summary: Business method interceptor bindings do not include bindings declared as meta-annotations of other interceptor bindings recursively
Key: WELD-1139
URL: https://issues.jboss.org/browse/WELD-1139
Project: Weld
Issue Type: Bug
Affects Versions: 2.0.0.Alpha2, 1.1.5.Final
Reporter: Martin Kouba
It seems that only one level of inheritance is taken into account. The problem is likely in {{Interceptors.flattenInterceptorBindings(BeanManagerImpl, Collection<Annotation>, boolean, boolean)}} or {{InterceptorBindingModel}}.
{quote}
9.5. Interceptor resolution:
For a business method or EJB timeout method, the interceptor bindings include the interceptor bindings declared or inherited by the bean at the class level, including, recursively, interceptor bindings declared as meta-annotations of other interceptor bindings and stereotypes, together with all interceptor bindings declared at the method level, including, recursively, interceptor bindings declared as meta-annotations of other interceptor bindings.
{quote}
See also CDI TCK 1.1 test:
https://github.com/jboss/cdi-tck/blob/master/impl/src/main/java/org/jboss...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] Created: (WELD-975) Programmatic lookup with @New qualifier not working
by Martin Kouba (JIRA)
Programmatic lookup with @New qualifier not working
---------------------------------------------------
Key: WELD-975
URL: https://issues.jboss.org/browse/WELD-975
Project: Weld
Issue Type: Bug
Affects Versions: 1.1.2.Final
Environment: JBoss AS7
TestNG
Arquillian CR5
Reporter: Martin Kouba
According to spec: "...the @New qualifier may be used, allowing the application to obtain a @New qualified bean, as defined in Section 3.12, @New qualified beans" (CDI 1.0; chapter 5.6. Programmatic lookup).
However using programmatic lookup with @New qualifier like:
{code}
@Inject @New Instance<Foo> foo;
{code}
results in:
{code}
org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308 Unable to resolve any beans for Types: [class org.jboss.cditck.arquillian.instance.Foo]; Bindings: [@javax.enterprise.inject.New(value=org.jboss.cditck.arquillian.instance.Foo.class)]
{code}
after trying to obtain reference via get() method.
Following code works ok:
{code}
@Inject @New Foo foo;
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months