2 Replies Latest reply on Sep 20, 2007 3:13 AM by sabagh

    Unwanted Deployment

    sabagh

      JBOSS scans the deploy directory and deploys every new EAR file it find.
      However, I want to deploy the EAR file when it is suitable for me and not in the moment I put it in the deploy directory.
      I know that once the EAR is already there I can deploy and undeploy it, but I don't want it to deploy the EAR file even in the first time.
      One solution I thought of is to put the ear file in a different directory and tell jboss to deploy the EAR file from a there - Is there a way to do that?
      Are there any other solutions?

        • 1. Re: Unwanted Deployment
          peterj

          Put your EAR file anywhere, and when you want to deploy it call the deploy() operation of the jboss.system:service=MainDeployer MBean, passing in the full path (or URL) for the EAR file. You can do this programatically, via the JMC Console, or via twiddle.

          Similarly, you can call undeploy to undeploy the application.

          By the way, if you use this scheme, you will have to redeploy the application if you restart the app server.

          • 2. Re: Unwanted Deployment
            sabagh

            thank you very much - I was under the impression that the ear file have to be located under the deploy directory of JBOSS