-
1. Re: access modifier of InternalEjbDescriptor is removed?
mkouba May 11, 2016 3:30 AM (in response to mulderbaba)Hi Mert,
InternalEjbDescriptor
is not (and never was) a part of the Weld API/SPI - it's an internal Weld construct. So an integrator should not use it at all. Is there a reason why GlassFish does not provide its own implementation oforg.jboss.weld.ejb.spi.EjbDescriptor
? -
2. Re: access modifier of InternalEjbDescriptor is removed?
mulderbaba Jun 22, 2016 8:49 AM (in response to mkouba)InternalEjbDescriptor is being used by registerInterceptors method of EjbServicesImpl class. Actually its not like providing its own implementation but it does an instanceof check on EjbDescriptor as:
if (ejbDesc instanceof org.jboss.weld.ejb.InternalEjbDescriptor) {
ejbDesc = ((org.jboss.weld.ejb.InternalEjbDescriptor<?>) ejbDesc).delegate();
}
-
3. Re: access modifier of InternalEjbDescriptor is removed?
mkouba Jun 22, 2016 8:58 AM (in response to mulderbaba)InternalEjbDescriptor
extendsForwardingEjbDescriptor
so all theEjbDescriptor
methods are delegated to the underlying EjbDescriptor instance. Is there a reason to unwrap the descriptor? I believe it should be safe to use the EjbDescriptor contract - no need to unwrap the instance. -
4. Re: access modifier of InternalEjbDescriptor is removed?
mulderbaba Jun 22, 2016 9:09 AM (in response to mkouba)Martin,
The statement from the code is:
// Work around bug that ejbDesc might be internal 299 descriptor.
which is available within glassfish source. I am looking into the real reason. If I cannot find a solid reason, I'll get rid of the unwrapping.
-
5. Re: access modifier of InternalEjbDescriptor is removed?
mkouba Jun 22, 2016 9:53 AM (in response to mulderbaba)I see. So the problem is the
EjbServicesImpl
needs to access the underlyingorg.glassfish.weld.ejb.EjbDescriptorImpl
instance. There is no guarantee theEjbDescriptor
instance passed toorg.jboss.weld.ejb.spi.EjbServices.registerInterceptors(EjbDescriptor<?>, InterceptorBindings)
will be of any specific implementation. In other words, integrators should not count on it. On the other hand, it's not explicitly defined and integrators may be expecting this.Also it seems it's safe to expect the type provided by
org.jboss.weld.bootstrap.spi.BeanDeploymentArchive.getEjbs()
forresolveEjb()
method but NOT forregisterInterceptors()
method. Which is a bit odd.I've created WELD-2184 to track this issue.