[
https://issues.apache.org/jira/browse/OWB-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Struberg resolved OWB-1462.
--------------------------------
Resolution: Fixed
In OWB we do use highly optimised byte code proxies. They do just call
super.fn() if a method is not intercepted/proxied. Otoh for methods which have
some interceptor needs we create different bytecode which triggers the
interceptor chain.
That means that 2 beans with different interceptor setup might end up with
different bytecode. Otoh this is only true if the list of proxied and unproxied
methods do differ. Romains code takes care of this already. But so far we did
not handle the case that 2 beans (for the same type) might end up with exactly
the same list of proxied/unproxied methods.
In this case we end up with exactly the same proxyClassName, and thus got a
ClassAlreadyDefined problem.
The fix is as simple as looking up whether the proposed proxyClassName does
already exist.
Thanks to @tandraschko and @rzo1 for the unit test and exploring the problem.
> . NormalScopeProxyFactory generates duplicate proxy class names for distinct
> @NormalScope beans of the same erased type
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: OWB-1462
> URL: https://issues.apache.org/jira/browse/OWB-1462
> Project: OpenWebBeans
> Issue Type: Bug
> Affects Versions: 4.0.3, 4.1.0
> Reporter: Richard Zowalla
> Assignee: Mark Struberg
> Priority: Major
> Attachments:
> 0001-OWB-XXXX-Reproducer-for-duplicate-proxy-class-name-a.patch,
> OWB-1462.patch
>
>
> see https://issues.apache.org/jira/browse/TOMEE-4603
> A reproducer in OWB is attached.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)