[jira] [Created] (OWB-1426) Missing bean types for indirectly implemented interfaces

2023-02-14 Thread Jean-Louis Monteiro (Jira)
Jean-Louis Monteiro created OWB-1426:


 Summary: Missing bean types for indirectly implemented interfaces
 Key: OWB-1426
 URL: https://issues.apache.org/jira/browse/OWB-1426
 Project: OpenWebBeans
  Issue Type: Bug
  Components: Core, TCK
Reporter: Jean-Louis Monteiro
 Fix For: 4.0.0


The following TCK test is failing in OWB and I think it's a good one from the 
spec point of view.

 
{color:#067d17}org.jboss.cdi.tck.tests.definition.bean.BeanDefinitionTest{color}
 

The spec says 
[https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#managed_bean_types]

 
{quote}The unrestricted set of bean types for a managed bean contains the bean 
class, every superclass and all interfaces it implements directly or indirectly.
The resulting set of bean types for a managed bean consists only of [legal bean 
types|https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#legal_bean_types],
 all other types are removed from the set of bean types.
Note the additional restrictions upon bean types of beans with normal scopes 
defined in [Unproxyable bean 
types|https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#unproxyable].
{quote}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (OWB-1425) Interceptors not being called on UnmanagedInstance

2023-02-14 Thread Jean-Louis Monteiro (Jira)
Jean-Louis Monteiro created OWB-1425:


 Summary: Interceptors not being called on UnmanagedInstance
 Key: OWB-1425
 URL: https://issues.apache.org/jira/browse/OWB-1425
 Project: OpenWebBeans
  Issue Type: Bug
  Components: Core, TCK
Reporter: Jean-Louis Monteiro
 Fix For: 4.0.0


OWB does not interceptors on UnmanagedInstance even though the specification is 
quite clear in that area.

 

https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#biz_method_full
{quote}When the application invokes:
 * a method of a bean via a contextual reference to the bean, as defined in 
[Contextual reference for a 
bean|https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#contextual_reference],

 * a method of a bean via a non-contextual reference to the bean, if the 
instance was created by the container (e.g. using {{InjectionTarget.produce()}} 
or {{{}*UnmanagedInstance.produce()*{}}}, or

 * a method of a bean via a non-contextual reference to the bean, if the 
instance was enhanced with the {{InterceptionFactory}} interface as defined in 
[The {{InterceptionFactory}} 
interface|https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#interception_factory],
the invocation is treated as a {_}business method invocation{_}.
{quote}
The spec also says
{quote}A method invocation passes through method interceptors and decorators 
if, and only if, it is a business method invocation.
Otherwise, the invocation is treated as a normal Java method call and is not 
intercepted by the container.
{quote}
 

We can't pass the following TCK test 
org.jboss.cdi.tck.tests.full.extensions.beanManager.unmanaged.UnmanagedInstanceTest

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OWB-1423) openwebbeans-impl-jakarta is using old javax namespace

2023-02-14 Thread Georg Tsakumagos (Jira)


[ 
https://issues.apache.org/jira/browse/OWB-1423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688352#comment-17688352
 ] 

Georg Tsakumagos commented on OWB-1423:
---

[~romain.manni-bucau] I've checked the jars and these are all jakarta 
classified. I am able to run a working test with openejb. My report about wrong 
imports is +wrong+ :). I was misleaded by the source.jar. So you are right. It 
works. You could close the ticket from my point. I will investigate my problem 
later with more time. I guess some kind of classloader issue. If i inspect the 
code where the NoSuchMethodError uccurs with reflection, the targeted object 
has the desired method. So sorry for my false alarm.



> openwebbeans-impl-jakarta is using old javax namespace
> --
>
> Key: OWB-1423
> URL: https://issues.apache.org/jira/browse/OWB-1423
> Project: OpenWebBeans
>  Issue Type: Bug
>Affects Versions: 2.0.26, 2.0.27
>Reporter: Georg Tsakumagos
>Priority: Major
>
> h3. Description
> Openwebbeans with jakarta qualifier should use the jakarta namespace. I try 
> to use openejb 9.0.0 for testing but run into a no NoSuchMethodError.
> The class 
> *_org.apache.webbeans.portable.events.discovery.BeforeBeanDiscoveryImpl_* is 
> using the old namespace.
> h3. Stacktrace
> {code:java}
> Caused by: org.apache.webbeans.exception.WebBeansException: 
> java.lang.NoSuchMethodError: 'void 
> jakarta.enterprise.inject.spi.BeforeBeanDiscovery.addAnnotatedType(jakarta.enterprise.inject.spi.AnnotatedType)'
>   at 
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:377)
>   at 
> org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:1146)
>   at 
> org.apache.webbeans.event.NotificationManager.doFireSync(NotificationManager.java:1009)
>   ... 61 more
> Caused by: java.lang.NoSuchMethodError: 'void 
> jakarta.enterprise.inject.spi.BeforeBeanDiscovery.addAnnotatedType(jakarta.enterprise.inject.spi.AnnotatedType)'
>   at 
> org.apache.bval.cdi.BValExtension.addBvalBinding(BValExtension.java:112)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> {code}
> h3. GAV Coordinates
> {code:xml}
> 
>   org.apache.openwebbeans
>   openwebbeans-impl
>   jakarta
>   2.0.27
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)