Hi Svetlin

this is a way to aggregate the webapp java:comp/env namespace without
handling it too specifically in the code base - at least it comes from that
idea.

We can add it in EjbJar and just skip it at deploy time (we do something
similar already, don't recally exactly where but it is typed enough to know
it is the comp bean).

Does it give you enough input to work on it or do you want some particular
code reference?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-16 15:10 GMT+02:00 Svetlin Zarev <[email protected]>:

> Hi Everyone,
>
> What's the purpose of the org.apache.openejb.config.CompManagedBean ? I'm
> asking in the context of TOMEE-2053.
>
> I have a @DataSourceDefinition with some attributes which should be
> overrriden by ejb-jar.xml. Everithing works great, with the sole exception
> of CompManagedBean. It seems that it "aggregates" the annotations from the
> other beans, but as it's artificially added to the ejb-jar by openejb, it
> does not have an entry in the ejb-jar.xml. Hence when the
> AnnotationDeployer processes the DataSourceDefinition annotation, if never
> finds an exisitin datasource definition in the ejb-jar.xml for it. This in
> turn makes the annotation deployer to add a datasource with wrong
> configuration to the AppModule's ejb-jar. So far so good, but later, the
> ConvertDataSourceDefinitions deployer collects all datasources from all
> JndiConsumers, so it collects the invalid definition as well and adds it to
> the AppModule's resources. And this breaks the application startup.
>
> Kind regards,
> Svetlin
>

Reply via email to