[
https://issues.apache.org/jira/browse/OPENEJB-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402080#comment-13402080
]
Marcel Urbanek commented on OPENEJB-1847:
-----------------------------------------
I got it running now. The trick seems to be to add
openejb.deploymentId.format={appId}/{moduleId}/{ejbName}
to the
system.properties
I am not completely sure what the reason is. I removed everything from my
ejb-jar.xml without success so this can not be the reason. But following I saw
on the console when not using "openejb.deploymentId.format":
INFO - Jndi(name=ear-scoped-cdi-beans.CompLocalBean) -->
Ejb(deployment-id=ear-scoped-cdi-beans.Comp)
I don't know where this CompLocalBean comes from, but it is registered for each
ear, and without "openejb.deploymentId.format" it seems to me that it is
registered under the very same name. After setting
"openejb.deploymentId.format" the output is as follows:
INFO -
Jndi(name=aTestEJBAnnotaitionEA/ear-scoped-cdi-beans/ear-scoped-cdi-beans.CompLocalBean)
-->
Ejb(deployment-id=aTestEJBAnnotaitionEA/ear-scoped-cdi-beans/ear-scoped-cdi-beans.Comp)
INFO -
Jndi(name=TestEJB3EA/ear-scoped-cdi-beans/ear-scoped-cdi-beans.CompLocalBean)
--> Ejb(deployment-id=TestEJB3EA/ear-scoped-cdi-beans/ear-scoped-cdi-beans.Comp)
and it works.
> When deploying two ear files in openejb only the first one gets deployed
> correctly
> ----------------------------------------------------------------------------------
>
> Key: OPENEJB-1847
> URL: https://issues.apache.org/jira/browse/OPENEJB-1847
> Project: OpenEJB
> Issue Type: Bug
> Components: deployment
> Affects Versions: 4.0.0
> Reporter: Marcel Urbanek
> Attachments: TestEJB3EA.ear, aTestEJBAnnotaitionEA.ear
>
>
> I deployed two ear files in open ejb by copying them to the "apps" directory.
> While each of the ear files is deployed correctly when deployed alone, when
> deploying them together open ejb will correctly find the ejbs in the second
> ear (log:"Auto-deploying ejb"), but it fails to register them in the jndi
> (log:"INFO: Jndi(name=...) --> Ejb(deployment-id=...)" is missing).
> I can reproduce this behaviour with any two ear files, even the most trivial
> ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira