[
https://issues.apache.org/jira/browse/OPENEJB-1330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133908#comment-13133908
]
Romain Manni-Bucau commented on OPENEJB-1330:
---------------------------------------------
i'll try to redeploy a snapshot in the following hour, could you test with the
4.0.0-beta-2-SNAPSHOT version please?
> providing id in application-client.xml has no effect on local client module
> name
> --------------------------------------------------------------------------------
>
> Key: OPENEJB-1330
> URL: https://issues.apache.org/jira/browse/OPENEJB-1330
> Project: OpenEJB
> Issue Type: Bug
> Components: configuration
> Affects Versions: 3.1.2, 3.1.4, 4.0-beta-1
> Reporter: Thorsten Wärtel
> Attachments: AppInfoBuilder.java.patch
>
>
> Some weeks ago, a problem with duplicate local client module names was posted
> on the openejb-users mailing list:
> http://openejb.979440.n4.nabble.com/OpenEJB-localclient-module-name-td2238205.html
> I am having the same problem in the following scenario:
> - multi-module project
> - module-a tests do local client injection, so there is an
> application-client.xml present in module-a/target/test-classes/META-INF
> - module-a builds an attached test-jar
> - module-b has a dependency on module-a's test-jar
> - module-b also does local client injection
> If I run tests in this project from command line, everything works fine in
> module-b: LocalClients from module-a are deployed with a local client module
> name of "module-a-1.0.0-SNAPSHOT-tests" and LocalClients from module-b use
> module name "test-classes".
> However, if I run tests in eclipse (using m2eclipse 0.10.2), a
> NameAlreadyBoundException is raised because LocalClients from module-a are
> already bound using alocal client module name of "test-classes", so
> module-b's LocalClients try to bind under the same name.
> The first reply on the mailing list hints that using a unique id attribute in
> application-client.xml would prevent this, but unfortunately this does not
> work in 3.1.2 (and current 3.1.3-SNAPSHOT).
> Doing some debugging, I found out that the id attribute is correctly set into
> class ApplicationClient when reading application-client.xml and also
> correctly passed on to class ClientModule. But I think there might be an
> error in AppInfoBuilder.getClientModuleId(ClientModule), where a module id is
> determined from ClientModule.getJarLocation() instead
> ClientModule.getModuleId(). The moduleId is already set to jarLocation in
> ClientModule, if no explicit id is provided. Changing getClientModuleId() to
> use getModuleId() did the trick for me, application-client.xml ids are now
> used as local client module names and there is no NameAlreadyBoundException
> raised anymore.
> I will attach a patch containing the change I made.
--
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