I was able to workaround parallel deployment setting
openejb.deploymentId.format = {appId}/{ejbJarId}/{ejbName}.I tested with a MDB and a Singleton and they worked as expected. JNDI would be complicated in that case, but I pretend to use only dependency injection. Is there any other side effect in this approach? Thanks 2014-09-24 2:45 GMT-03:00 Romain Manni-Bucau <[email protected]>: > I dont have a tutorial but idea is to: > - ask httpd to route new requests to other instances > - wait no more session exists > - shutdown the instance > > > Romain Manni-Bucau > Twitter: @rmannibucau > Blog: http://rmannibucau.wordpress.com/ > LinkedIn: http://fr.linkedin.com/in/rmannibucau > Github: https://github.com/rmannibucau > > > 2014-09-23 23:15 GMT+02:00 Felipe Jaekel <[email protected]>: > > I didn't found any tutorials of graceful shutdown behind an httpd on > > Google, could you send me a link of one? > > > > About the parallel deployment, I created a ticket in case you change your > > mind: https://issues.apache.org/jira/browse/TOMEE-1360 > > > > Thanks > > > > 2014-09-23 17:14 GMT-03:00 Romain Manni-Bucau <[email protected]>: > > > >> well usually we use graceful shutdown behind an httpd for it but yes > >> that's a limitation. If we fix it we break more than we fix so I guess > >> we'll not. > >> > >> > >> Romain Manni-Bucau > >> Twitter: @rmannibucau > >> Blog: http://rmannibucau.wordpress.com/ > >> LinkedIn: http://fr.linkedin.com/in/rmannibucau > >> Github: https://github.com/rmannibucau > >> > >> > >> 2014-09-23 20:45 GMT+02:00 Felipe Jaekel <[email protected]>: > >> > The new version is deployed before the old one is undeployed. That's > why > >> I > >> > like parallel deployment, it's very useful because I can fix problems > in > >> my > >> > apps without impact to users that are already logged in (JSF view > state > >> > issues for example). Users who need the fix simply logout and login > >> again, > >> > and when there are no more sessions in the old version it's > >> > automatically undeployed. As I don't use cluster this process has > worked > >> > very well in the last years. > >> > > >> > After migrating to TomEE I plan moving some stuff to ejbs, so in > order to > >> > keep using parallel deployment I'll I need to move the ejbs to a > separate > >> > module? > >> > > >> > Thanks > >> > > >> > 2014-09-23 15:00 GMT-03:00 Romain Manni-Bucau <[email protected] > >: > >> > > >> >> Didn't check back but you should have it in the log, if tomcat > deploys > >> >> new version before undeploying previous one (I think so now) we can't > >> >> fix it. This is a feature for apps without ejbs > >> >> > >> >> > >> >> Romain Manni-Bucau > >> >> Twitter: @rmannibucau > >> >> Blog: http://rmannibucau.wordpress.com/ > >> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau > >> >> Github: https://github.com/rmannibucau > >> >> > >> >> > >> >> 2014-09-23 18:56 GMT+02:00 Felipe Jaekel <[email protected]>: > >> >> > Hi, > >> >> > > >> >> > In 1.7.1 it always happens. Parallel deploy fails with this in > server > >> >> log: > >> >> > > >> >> > Set 23, 2014 1:47:38 PM org.apache.openejb.config.AppInfoBuilder > build > >> >> > INFORMAÇÕES: Enterprise application > >> >> > > "/home/ec2-user/apache-tomee-plus/webapps/colaborador##20140923-1346" > >> >> > loaded. > >> >> > Set 23, 2014 1:47:38 PM > org.apache.openejb.assembler.classic.Assembler > >> >> > createApplication > >> >> > INFORMAÇÕES: Assembling app: > >> >> > /home/ec2-user/apache-tomee-plus/webapps/colaborador##20140923-1346 > >> >> > Set 23, 2014 1:47:38 PM > org.apache.openejb.assembler.classic.Assembler > >> >> > createApplication > >> >> > GRAVE: Application cannot be deployed as it contains deployment-ids > >> >> > which are in use: app: > >> >> > /home/ec2-user/apache-tomee-plus/webapps/colaborador##20140923-1346 > >> >> > Set 23, 2014 1:47:38 PM > org.apache.openejb.assembler.classic.Assembler > >> >> > createApplication > >> >> > GRAVE: DeploymentId already used: NotificacaoComercialTimer > >> >> > Set 23, 2014 1:47:38 PM > org.apache.openejb.assembler.classic.Assembler > >> >> > createApplication > >> >> > GRAVE: DeploymentId already used: NotificacaoTarefaInternaTimer > >> >> > Set 23, 2014 1:47:38 PM > org.apache.openejb.assembler.classic.Assembler > >> >> > createApplication > >> >> > GRAVE: DeploymentId already used: jmsColaboradorTopicMdb > >> >> > Set 23, 2014 1:47:38 PM > org.apache.tomee.catalina.TomcatWebAppBuilder > >> >> > startInternal > >> >> > GRAVE: Unable to deploy collapsed ear in war > >> >> > > >> >> > >> > StandardEngine[Catalina].StandardHost[localhost].StandardContext[/colaborador##20140923-1346] > >> >> > org.apache.openejb.DuplicateDeploymentIdException: Application > cannot > >> >> > be deployed as it contains deployment-ids which are in use: app: > >> >> > /home/ec2-user/apache-tomee-plus/webapps/colaborador##20140923-1346 > >> >> > NotificacaoComercialTimer > >> >> > NotificacaoTarefaInternaTimer > >> >> > jmsColaboradorTopicMdb > >> >> > at > >> >> > >> > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:663) > >> >> > at > >> >> > >> > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:623) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1248) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1087) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130) > >> >> > at > >> >> > >> > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) > >> >> > at > >> >> > >> > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > >> >> > at > >> >> > >> > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378) > >> >> > at > >> >> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > >> >> > at > >> >> > >> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) > >> >> > at > >> >> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) > >> >> > at > >> >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) > >> >> > at > >> >> > org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) > >> >> > at > >> >> > >> > org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) > >> >> > at > >> >> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > >> >> > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > >> >> > at > >> >> > >> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > >> >> > at > >> >> > >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > >> >> > at java.lang.Thread.run(Thread.java:745) > >> >> > > >> >> > Set 23, 2014 1:47:38 PM org.apache.catalina.core.ContainerBase > >> >> removeChild > >> >> > GRAVE: ContainerBase.removeChild: destroy: > >> >> > org.apache.catalina.LifecycleException: An invalid Lifecycle > >> >> > transition was attempted ([before_destroy]) for component > >> >> > > >> >> > >> > [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/colaborador##20140923-1346]] > >> >> > in state [STARTING_PREP] > >> >> > at > >> >> > >> > org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:409) > >> >> > at > >> >> > org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:299) > >> >> > at > >> >> > >> > org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1524) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1505) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1254) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1087) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130) > >> >> > at > >> >> > >> > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) > >> >> > at > >> >> > >> > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > >> >> > at > >> >> > >> > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378) > >> >> > at > >> >> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > >> >> > at > >> >> > >> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) > >> >> > at > >> >> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) > >> >> > at > >> >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) > >> >> > at > >> >> > org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) > >> >> > at > >> >> > >> > org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) > >> >> > at > >> >> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > >> >> > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > >> >> > at > >> >> > >> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > >> >> > at > >> >> > >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > >> >> > at java.lang.Thread.run(Thread.java:745) > >> >> > > >> >> > Set 23, 2014 1:47:38 PM org.apache.catalina.core.ContainerBase > >> >> addChildInternal > >> >> > GRAVE: ContainerBase.addChild: start: > >> >> > org.apache.catalina.LifecycleException: Failed to start component > >> >> > > >> >> > >> > [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/colaborador##20140923-1346]] > >> >> > at > >> >> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) > >> >> > at > >> >> > >> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) > >> >> > at > >> >> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) > >> >> > at > >> >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) > >> >> > at > >> >> > org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) > >> >> > at > >> >> > >> > org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) > >> >> > at > >> >> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > >> >> > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > >> >> > at > >> >> > >> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > >> >> > at > >> >> > >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > >> >> > at java.lang.Thread.run(Thread.java:745) > >> >> > Caused by: org.apache.tomee.catalina.TomEERuntimeException: > >> >> > org.apache.openejb.DuplicateDeploymentIdException: Application > cannot > >> >> > be deployed as it contains deployment-ids which are in use: app: > >> >> > /home/ec2-user/apache-tomee-plus/webapps/colaborador##20140923-1346 > >> >> > NotificacaoComercialTimer > >> >> > NotificacaoTarefaInternaTimer > >> >> > jmsColaboradorTopicMdb > >> >> > at > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1257) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1087) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130) > >> >> > at > >> >> > >> > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) > >> >> > at > >> >> > >> > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > >> >> > at > >> >> > >> > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378) > >> >> > at > >> >> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > >> >> > ... 10 more > >> >> > Caused by: org.apache.openejb.DuplicateDeploymentIdException: > >> >> > Application cannot be deployed as it contains deployment-ids which > are > >> >> > in use: app: > >> >> /home/ec2-user/apache-tomee-plus/webapps/colaborador##20140923-1346 > >> >> > NotificacaoComercialTimer > >> >> > NotificacaoTarefaInternaTimer > >> >> > jmsColaboradorTopicMdb > >> >> > at > >> >> > >> > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:663) > >> >> > at > >> >> > >> > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:623) > >> >> > at > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1248) > >> >> > ... 16 more > >> >> > > >> >> > Set 23, 2014 1:47:38 PM org.apache.catalina.startup.HostConfig > >> deployWAR > >> >> > GRAVE: Error deploying web application archive > >> >> > > >> >> > >> > /home/ec2-user/apache-tomee-plus-1.7.1/webapps/colaborador##20140923-1346.war > >> >> > java.lang.IllegalStateException: ContainerBase.addChild: start: > >> >> > org.apache.catalina.LifecycleException: Failed to start component > >> >> > > >> >> > >> > [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/colaborador##20140923-1346]] > >> >> > at > >> >> > >> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904) > >> >> > at > >> >> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) > >> >> > at > >> >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) > >> >> > at > >> >> > org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) > >> >> > at > >> >> > >> > org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) > >> >> > at > >> >> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > >> >> > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > >> >> > at > >> >> > >> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > >> >> > at > >> >> > >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > >> >> > at java.lang.Thread.run(Thread.java:745) > >> >> > > >> >> > Set 23, 2014 1:47:38 PM org.apache.catalina.startup.HostConfig > >> deployWAR > >> >> > INFORMAÇÕES: Deployment of web application archive > >> >> > > >> >> > >> > /home/ec2-user/apache-tomee-plus-1.7.1/webapps/colaborador##20140923-1346.war > >> >> > has finished in 4,414 ms > >> >> > > >> >> > > >> >> > 2014-09-08 15:43 GMT-03:00 Romain Manni-Bucau < > [email protected] > >> >: > >> >> > > >> >> >> Hi > >> >> >> > >> >> >> older version should be deleted and not stay deployed/be > redeployed > >> >> >> > >> >> >> are you able to reproduce it deterministicly? > >> >> >> > >> >> >> > >> >> >> Romain Manni-Bucau > >> >> >> Twitter: @rmannibucau > >> >> >> Blog: http://rmannibucau.wordpress.com/ > >> >> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau > >> >> >> Github: https://github.com/rmannibucau > >> >> >> > >> >> >> > >> >> >> 2014-09-08 20:27 GMT+02:00 Felipe Jaekel <[email protected]>: > >> >> >> > Hi, > >> >> >> > > >> >> >> > I'm migrating from Tomcat to TomEE. > >> >> >> > > >> >> >> > In Tomcat parallel deployment is working fine, but in TomEE I > >> noticed > >> >> two > >> >> >> > things: > >> >> >> > > >> >> >> > 1. An extra unversioned entry of my webapp appears in the > >> manager > >> >> >> > application > >> >> >> > 2. If restart the server only the most recent version of the > >> >> >> application > >> >> >> > starts. The older ones fail with a > >> DuplicateDeploymentIdException: > >> >> >> > > >> >> >> > GRAVE: Unable to deploy collapsed ear in war > >> >> >> > > >> >> >> > >> >> > >> > StandardEngine[Catalina].StandardHost[localhost].StandardContext[/colaborador##20140908-1455] > >> >> >> > org.apache.openejb.DuplicateDeploymentIdException: Application > >> cannot > >> >> >> > be deployed as it contains deployment-ids which are in use: app: > >> >> >> > > >> >> > >> > /home/ec2-user/apache-tomee-plus-1.7.0/webapps/colaborador##20140908-1455 > >> >> >> > jmsColaboradorTopicMdb > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:663) > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:623) > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1248) > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1087) > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130) > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378) > >> >> >> > at > >> >> >> > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) > >> >> >> > at > >> >> >> > >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) > >> >> >> > at > >> >> >> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) > >> >> >> > at > >> >> >> > >> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) > >> >> >> > at > >> >> >> > >> >> > >> > org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) > >> >> >> > at > >> >> >> > >> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > >> >> >> > at > java.util.concurrent.FutureTask.run(FutureTask.java:262) > >> >> >> > at > >> >> >> > >> >> > >> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > >> >> >> > at > >> >> >> > >> >> > >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > >> >> >> > at java.lang.Thread.run(Thread.java:745) > >> >> >> > > >> >> >> > > >> >> >> > No big deal about item 1, but in item 2 will users from older > >> versions > >> >> >> lose > >> >> >> > their sessions? > >> >> >> > > >> >> >> > Thanks > >> >> >> > >> >> > >> >
