2 Replies Latest reply on Jan 21, 2012 5:20 AM by gvagenas

    Access to the DeployableContainer

    gvagenas

      Hi,

       

      In the container i am working (for Sip Servlets testing) based on Tomcat 6 (and in future Tomcat 7), in some test cases there are some special needs such as:

      • Add/Remove a connector during the test execution
      • Reload the context during the test execution
      • Restart the container using different init properties during the test execution

       

      All these things can be done if the test client have access to the DeployeableContainer.

       

      I was wondering if there is already a way to access the Container to perform such tasks, or should i provide access to the DeployableContainer, and is this a good idea?

       

      ContainerController is not sufficient for what i am trying to do.

       

      Regards

      George

        • 1. Re: Access to the DeployableContainer
          aslak

          ContainerController might only work for the last item in your list.

           

          You could wrap the DeployableContainer in a more specialized API that you expose in the TestClass via your own Arquillian Extension.

          That gives you control to clean up / rest state outside the TestClass it self as well.

           

          I don't think exposing the DeployableContainer directly is a good idea.

          • 2. Re: Access to the DeployableContainer
            gvagenas

            Aslak, thanks for the reply. I will create an extension for that and push it back, maybe it could be usefull to other people also.