2 Replies Latest reply on Feb 24, 2010 6:48 AM by Aslak Knutsen

    Container Configuration Mechanism

    Andrew Rubinger Master

      So while Arquillian allows us to abstract the container from the test, I think we still need to provide a way for users to configure the target container.


      For instance:


      public class GlassFishEmbeddedContainer implements DeployableContainer
         // Hardcoded bind port
         private int port = 8080;


      EJB3 MDBs, for instance, are generic listeners which rely upon the JCA abstraction.  And they need to be configured too; so they configure the adaptor via a generic map of properties:


      @MessageDriven(activationConfig =
            @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
            @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/MyQueue")})
      public class MyMdb implements javax.jms.MessageListener {}


      So for us, alongside specifying a target container explicitly, we can do something similar.  Thoughts?