1 Reply Latest reply on Apr 8, 2014 9:48 AM by Alex Soto

    Configuration of an Arquillian Extension

    Alex Soto Newbie

      Hello I am developing an extension and I need that users configure some parameters. I have done next steps:


      Create a MocoConfigurator class which listens for arquillian descriptor:


          private InstanceProducer<MocoConfiguration> configurationProvider;
          public void configure(@Observes ArquillianDescriptor arquillianDescriptor) {
              Map<String, String> config = arquillianDescriptor.extension(EXTENSION_NAME).getExtensionProperties();


      Then I have added MocoConfiguration class to extension archive:


        public Archive<?> createAuxiliaryArchive() {
         return ShrinkWrap.create(JavaArchive.class, "arquillian-moco.jar")
                    .addAsServiceProvider(RemoteLoadableExtension.class, MocoRemoteExtension.class);


      Then in extension class I have registered the observer:


        public void register(ExtensionBuilder builder) {


      The instance is required in container side so I have added next line on a class that is executed in remote side.


      private Instance<MocoConfiguration> config;



      The problem is that when I use this code the class is not executed but no error is thrown, but if I comment the previous line and I hardcoded the port then it works, so it seems I have missed something to do so this can work on remote side. Am I wrong= What I have missed?


      Thank you so much for your help.


      And finally I have added the information inside arquillian.xml (which is configured to use Servlet protocol).


      The problem is that although the information is loaded correctly