Hi David,
are you able to reproduce it in a test?
Concretely proxies can be created for jakarta classes, you can validate it
with this trivial test:
@Test
public void jakartaProxyTest()
{
final WebBeansContext webBeansContext = new WebBeansContext();
final NormalScopeProxyFactory pf = new
NormalScopeProxyFactory(webBeansContext);
final Object proxy = pf.createNormalScopeProxy(new
OwbBean<CompletionListener>() {
@Override
public Set<Type> getTypes() {
return null;
}
@Override
public Set<Annotation> getQualifiers() {
return null;
}
@Override
public Class<? extends Annotation> getScope() {
return ApplicationScoped.class;
}
@Override
public String getName() {
return null;
}
@Override
public boolean isNullable() {
return false;
}
@Override
public Set<InjectionPoint> getInjectionPoints() {
return null;
}
@Override
public Class<?> getBeanClass() {
return null; // this is what we test
}
@Override
public Set<Class<? extends Annotation>> getStereotypes() {
return null;
}
@Override
public boolean isAlternative() {
return false;
}
@Override
public CompletionListener create(final
CreationalContext<CompletionListener> context) {
return null;
}
@Override
public void destroy(final CompletionListener instance, final
CreationalContext<CompletionListener> context) {
}
@Override
public Producer<CompletionListener> getProducer() {
return null;
}
@Override
public WebBeansType getWebBeansType() {
return null;
}
@Override
public Class<CompletionListener> getReturnType() {
return CompletionListener.class;
}
@Override
public void setSpecializedBean(boolean specialized) {
}
@Override
public boolean isSpecializedBean() {
return false;
}
@Override
public void setEnabled(boolean enabled) {
}
@Override
public boolean isEnabled() {
return false;
}
@Override
public String getId() {
return null;
}
@Override
public boolean isPassivationCapable() {
return false;
}
@Override
public boolean isDependent() {
return false;
}
@Override
public WebBeansContext getWebBeansContext() {
return null;
}
});
assertNotNull(proxy);
System.out.println(asList(proxy.getClass().getDeclaredFields()));
}
This method only affects in which package the proxy is created so it must
be useless and revertable.
Also tested the runtime and it works too it seems so would be great to at
least add one unit test of the breaking change if real or fix the actual
issue and revert this if the source is something else (like jakarta jar
endorsing the jvm or so which is not normal).
Can you help to refine it please?
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>
Le sam. 13 mars 2021 à 18:46, David Blevins <[email protected]> a
écrit :
> > On Mar 12, 2021, at 11:57 PM, Romain Manni-Bucau <[email protected]>
> wrote:
> >
> > Hi,
> >
> > Likely more a question for David: why is jakarta considered as a
> forbidden
> > package (
> >
> https://github.com/apache/openwebbeans/commit/6ede81da26a4a65dc0c88fda7e438f29114fea37
> )
> > ?
> >
> > To explain why I ask: jakarta is a module as any other, and we shouldn't
> > get abused by the presence of javax just before which is there for the
> java
> > *se* part of javax api and not EE one so not sure I get the rational
> there,
> > any test/sample I can run to understand?
>
> A javax-to-jakarta namespace switch in bytecode doesn't appear to work
> without this change. For TomEE 9 80% of the TCK will fail with due to
> deployment errors.
>
> If you revert this change locally and rebuild these repos
>
> - https://github.com/apache/tomee
> - https://github.com/apache/tomee-jakarta
>
> here's a tck test that shows it:
>
> ./runtests --web tomee-plume
> com.sun.ts.tests.ejb30.lite.appexception.singleton.annotated
>
> That script is in this branch. Here's also the TCK download URL.
>
> - https://github.com/apache/tomee-tck/tree/jakartaee9-tck
> -
> https://download.eclipse.org/jakartaee/platform/9/jakarta-jakartaeetck-9.0.2.zip
>
> Wherever the TCK is unpacked you add this to your ~/.m2/settings.xml.
> Here are my settings for reference:
>
> <profile>
> <id>jakartaee-tck</id>
> <activation>
> <activeByDefault>true</activeByDefault>
> </activation>
> <properties>
>
> <jakartaee9.cts.home>/Users/dblevins/work/tcks/jakartaeetck-9.0.2</jakartaee9.cts.home>
>
> <jakartaee9.ri.home>/Users/dblevins/work/tcks/glassfish6/glassfish</jakartaee9.ri.home>
> </properties>
> </profile>
>
> The final thing to get setup is copy an Ant install into this location of
> the TCK.
>
> - jakartaeetck-9.0.2/tools/ant/
>
> Here's how mine looks:
>
> $ ls /Users/dblevins/work/tcks/jakartaeetck-9.0.2/tools/ant
> CONTRIBUTORS LICENSE WHATSNEW
> etc lib
> INSTALL NOTICE bin
> fetch.xml manual
> KEYS README contributors.xml
> get-m2.xml patch.xml
>
> Use Java 8 as the TCK itself doesn't run with Java 11 yet.
>
>
> -David
>
>