I'll take a look at AutoDeployer and see if I can come up with a patch and submit it.
On Fri, Feb 27, 2015 at 4:06 AM, Romain Manni-Bucau <[email protected]> wrote: > agree, > > the algorithm is broken if tomee extracts anything, ie ear or war > > you can open an issue on tomee jira and if you want to propose a fix > it would be welcomed (guess just handling unpacking is the fix to do) > > > Romain Manni-Bucau > @rmannibucau > http://www.tomitribe.com > http://rmannibucau.wordpress.com > https://github.com/rmannibucau > > > 2015-02-26 19:09 GMT+01:00 Adam Cornett <[email protected]>: > > When using autoDeploy: > > > > <tomee> > > <Deployments dir="apps" autoDeploy="true" /> > > </tomee> > > > > with an ear in the apps folder (lets call it my-app-1.0.ear) when I > start > > TomEE, it will extract the ear (to $CATALINA_HOME/apps/my-app-1.0) then > > start deploying the application. > > > > After tomee finishes deploying my application, I get this oddity in the > log: > > > > 26-Feb-2015 12:51:39.311 INFO [localhost-startStop-1] > > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans > > Container has started, it took 816 ms. > > 26-Feb-2015 12:51:39.973 INFO [AutoDeployer] > > org.apache.openejb.config.AutoDeployer.scan New File: /opt/tomee/apps/ > > my-app-1.0.ear > > 26-Feb-2015 12:51:39.973 INFO [AutoDeployer] > > org.apache.openejb.config.AutoDeployer.fileAdded Starting Auto-Deployment > > of: /opt/tomee/apps/my-app-1.0.ear > > > > > > TomEE then tries to deploy the application (which it already started), > > until (several hundred lines later) gives me: > > > > 26-Feb-2015 12:51:44.288 SEVERE [AutoDeployer] > > org.apache.openejb.assembler.classic.Assembler.createApplication > > Application cannot be deployed as it contains deployment-ids which are in > > use: app: /opt/tomee-security/apps/apps/my-app-1.0 > > ... (errors for the duplicate IDs on all of my EJB objects already > > deployed in the now un-zipped ear) > > > > It seems that the AutoDeployer is not checking to see if the 'New File' > is > > already deployed. I can build a minimal working example if needed, but I > > think this one should be fairly easy to re-create. > > > > It should be noted that the initial deployment works, and my application > > seems to function correctly, but start up does take longer (~5 sec) due > to > > the failed deployment attempt. > > > > - Adam Cornett > -- Adam Cornett [email protected] (678) 296-1150
