5 Replies Latest reply on Oct 17, 2011 6:50 AM by aslak

    Multiple sun-resources.xml

    kfis

      Hi Arquillian Team,

      First of all, Thank you

      Arquillian leveraged our integration-tests incredible and we already found problems in our set-up with it during build-lifecycle.

       

      Now i want to configure my gf-embedded as close as possible to our production, so i have an assambly of all sun-resources which i want to use for setting up my embedded gf.

      Unfortunately I just know of

      <configuration>

           <property name="sunResourcesXml">target/config/glassfish/jdbc/jdbc-connections.xml</property>

           <property name="sunResourcesXml">target/config/glassfish/jms/jms-connections.xml</property>

      </configuration>

       

      So the last one wins and i got no jdbc-connections.

       

      Is there a way of adding multiple sun-resources?

       

      Thank you

      Konrad Fischer

        • 1. Re: Multiple sun-resources.xml
          vineet.reynolds

          Is there a way of adding multiple sun-resources?

          Right now there isn't. The embedded-GF plugin uses Glassfish's CommandRunner to process the sunResourcesXml file. This is equivalent to running "asadmin add-resources sunResourcesXmlfile"; it does so only once. For now, you'll have to place all your resources in one sun-resources.xml/glassfish-resources.xml file and provide it's location in arquillian.xml.

          1 of 1 people found this helpful
          • 2. Re: Multiple sun-resources.xml
            kfis

            Ah thank you, after your response, i had a quick look to the source of

            org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer

            ....

            if(configuration.getSunResourcesXml() != null)

                  {

                     try

                     {

                        executeCommand(COMMAND_ADD_RESOURCES, this.configuration.getSunResourcesXml());

                     }

                     catch (Throwable e)

                     {

                        throw new RuntimeException("Could not deploy sun-reosurces file: " + configuration.getSunResourcesXml(), e);

                     }

                  }

            .....

             

            It seems possible to make this feature available. Do you think that in a future Version of Arquillian this can be added?

            So for now, I will write me an maven-merge plugin to get my resources merged before assemble to ship it to my modules.

             

            Thank you

            • 3. Re: Multiple sun-resources.xml
              aslak

              Konrad: Sure, i see no reason why not. Why don't you file a jira and make a pull request ?

              • 4. Re: Multiple sun-resources.xml
                kfis

                Oh sure, I will do that. Dont hate, participate

                Gonna do that on weekend

                • 5. Re: Multiple sun-resources.xml
                  aslak

                  That's the spirit!