[
https://issues.apache.org/jira/browse/TOMEE-4456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Struberg updated TOMEE-4456:
---------------------------------
Description:
It seems that a {{<trim/>}} in beans.xml does work when starting tomee in
Tomcat but not when just using openejb-core for the bootstrap (via JNDI e.g.).
In Tomcat we use the {{DeploymentLoader#mergeBeansXml}} which has the following
code:
{source}
if ("ALL".equalsIgnoreCase(beanDiscoveryMode) && beans.isTrim()) {
beanDiscoveryMode = "TRIM";
}
{source}
A similar path isn't here for the standard boot process in openejb-core e.g. in
{{EJBJarInfoBuilder#239}}
That means that we effectively pick up different CDI beans when running unit
tests vs running in the real Tomcat later on.
was:
It seems that a {{<trim/>}} in beans.xml does work when starting tomee in
Tomcat but not when just using openejb-core for the bootstrap (via JNDI e.g.).
In Tomcat we use the {{DeploymentLoader#mergeBeansXml}} which has the following
code:
{source}
if ("ALL".equalsIgnoreCase(beanDiscoveryMode) && beans.isTrim()) {
beanDiscoveryMode = "TRIM";
}
{source}
A similar path isn't here for the standard boot process in openejb-core e.g. in
{{OpenEJBBeanInfoService#50}}
That means that we effectively pick up different CDI beans when running unit
tests vs running in the real Tomcat later on.
> beans.xml <trim/> doesn't work in openejb-core boot
> ---------------------------------------------------
>
> Key: TOMEE-4456
> URL: https://issues.apache.org/jira/browse/TOMEE-4456
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Core Server
> Affects Versions: 8.0.16, 10.0.0
> Reporter: Mark Struberg
> Assignee: Mark Struberg
> Priority: Critical
> Fix For: 8.0.17
>
>
> It seems that a {{<trim/>}} in beans.xml does work when starting tomee in
> Tomcat but not when just using openejb-core for the bootstrap (via JNDI e.g.).
> In Tomcat we use the {{DeploymentLoader#mergeBeansXml}} which has the
> following code:
> {source}
> if ("ALL".equalsIgnoreCase(beanDiscoveryMode) && beans.isTrim()) {
> beanDiscoveryMode = "TRIM";
>
}
> {source}
> A similar path isn't here for the standard boot process in openejb-core e.g.
> in {{EJBJarInfoBuilder#239}}
> That means that we effectively pick up different CDI beans when running unit
> tests vs running in the real Tomcat later on.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)