-->

TomEE, EJB and virtual-hosts

2019-06-06 00:23发布

问题:

I am simulating multiple TomEE (1.7.1) instances using virtual-hosts. I have multiple virtual-hosts that are deploying the same war with the same EJBs.

This leads to:

org.apache.openejb.DuplicateDeploymentIdException: Application cannot be deployed as it contains deployment-ids which are in use

Any suggestions on how to solve this?

回答1:

did you try openejb.deploymentId.format = {appId}/{ejbJarId}/{ejbName} in conf/system.properties?

To make it even more portable coming 1.7.2 (release process in progress) and coming 2.x will support:

openejb.deploymentId.format = {host}/{appId}/{ejbJarId}/{ejbName}

and even

openejb.deploymentId.format = {hash}/{host}/{appId}/{ejbJarId}/{ejbName}