Jan Bednar created CAMEL-12610:
----------------------------------
Summary: Camel bean component invokes cached instance of bean in
Registry
Key: CAMEL-12610
URL: https://issues.apache.org/jira/browse/CAMEL-12610
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.21.1, 2.21.0, 2.20.3, 2.20.2, 2.20.1, 2.20.0
Environment: N/A
Reporter: Jan Bednar
Related SO question:
[https://stackoverflow.com/questions/51108913/camel-bean-component-invokes-cached-instance-of-named-dependent-bean]
Every invocation of bean component should query Registry for actual instance.
Now it is cached somewhere, even if endpoint parameter cache=false specified.
This behavior breaks java-ee compliance:
[https://docs.oracle.com/javaee/7/api/javax/enterprise/context/Dependent.html]
{quote}Every invocation of the [{{Context.get(Contextual,
CreationalContext)}}|https://docs.oracle.com/javaee/7/api/javax/enterprise/context/spi/Context.html#get-javax.enterprise.context.spi.Contextual-javax.enterprise.context.spi.CreationalContext-]
operation of the context object for the {{@Dependent}} scope returns a new
instance of the given bean.
{quote}
Full reproducible project with unit test and deployable WAR package, which
passes with 2.19.x and lower. Fails with 2.20.x and higher [on
Github|https://github.com/bedlaj/camel-dependent-bean].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)