Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-397

Re enable support for sunResourceXML

    Details

      Description

      in the move from 3.1 to 3.0 the support for sunResourceXML was lost.

      sunResourceXML support on Suite level should be added.

        Gliffy Diagrams

          Activity

          Hide
          aslak Aslak Knutsen added a comment -

          Work started: https://github.com/aslakknutsen/arquillian/tree/ARQ-397

          Need to figure out how to do individual Descriptor deploy/undeploy.

          Show
          aslak Aslak Knutsen added a comment - Work started: https://github.com/aslakknutsen/arquillian/tree/ARQ-397 Need to figure out how to do individual Descriptor deploy/undeploy.
          Hide
          aslak Aslak Knutsen added a comment -

          created glassfish feature request: http://java.net/jira/browse/GLASSFISH-16240

          Show
          aslak Aslak Knutsen added a comment - created glassfish feature request: http://java.net/jira/browse/GLASSFISH-16240
          Hide
          dan.j.allen Dan Allen added a comment -

          It would be nice to have sunResourceXml support in the container configuration as it was in Alpha3. At the very least, this gave developers a way to add data source entries in the short term for persistence testing.

          Show
          dan.j.allen Dan Allen added a comment - It would be nice to have sunResourceXml support in the container configuration as it was in Alpha3. At the very least, this gave developers a way to add data source entries in the short term for persistence testing.
          Hide
          aslak Aslak Knutsen added a comment - - edited

          work has moved here, https://github.com/arquillian/arquillian-container-glassfish/blob/ARQ-397

          sunResourceXML support is added, but missing support for Descriptor deployment (needs support for understanding the descriptor to undeploy individual resources)

          (currently should work against Alpha5, needs update for arquillian-core)

          Show
          aslak Aslak Knutsen added a comment - - edited work has moved here, https://github.com/arquillian/arquillian-container-glassfish/blob/ARQ-397 sunResourceXML support is added, but missing support for Descriptor deployment (needs support for understanding the descriptor to undeploy individual resources) (currently should work against Alpha5, needs update for arquillian-core)
          Hide
          baraber Richard Barabe added a comment -

          I was interrested in testing it so I checkouted your branch and tryed to install it localy. First I had the following error :

          'dependencies.dependency.version' for org.jboss.shrinkwrap:shrinkwrap-extension-glassfish:jar is missing. @ line 43, column 19

          I just added the version to pom.xml (1.0.0-alpha-12) and now I cannot install because the "IntegrationWarTestCase" fails on :

          Failed tests:
          shouldBeAbleToInjectEJBAsInstanceVariable(org.jboss.arquillian.container.glassfish.embedded_3_1.app.IntegrationWarTestCase)

          It seems that the test case in error was not able to inject the referenced EJB :

          @EJB
          private NoInterfaceEJB bean;
             
          @Test
          public void shouldBeAbleToInjectEJBAsInstanceVariable() throws Exception 
          {
             Assert.assertNotNull(
                   "Verify that the Bean has been injected",
                   bean);
                
             Assert.assertEquals("Arquillian", bean.getName());
          }
          

          Having no clue why this could happend, I just installed it skipping the tests, and tried the installed snapshot on my project.

          The sun-resources.xml is deployed correctly :

          INFO: command add-resources result: PlainTextActionReporterSUCCESSDescription: add-resources AdminCommandnull
          JDBC connection pool jdbc/wakwi-pool created successfully.
          JDBC resource jdbc/wakwi-ds created successfully.

          However ... I have the problem that the ejb is not injected in my test.
          My test code :

          @RunWith(Arquillian.class)
          public class TestFileManagementServiceTest {
           
              @Deployment
              public static WebArchive createDeployment() {
                  return ShrinkWrap.create(WebArchive.class, "testFileManagementService.war").addClasses(
                      FileManagementService.class,
                      File.class, 
                      Category.class, 
                      FileStore.class,
                      CurrentFileStore.class,
                      DefaultFileStore.class).
                      addAsResource("test-persistence.xml", ArchivePaths.create("META-INF/persistence.xml")).
                      addAsResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
              }
              @EJB
              private FileManagementService service;
           
              @Test
              public void testSaveFile() {
                  assertNotNull("Service should have been injected.", service);
              }
          }
          

          Do you have the same problem injecting an EJB using the branch ARQ-397 ?
          Is it related ?

          Show
          baraber Richard Barabe added a comment - I was interrested in testing it so I checkouted your branch and tryed to install it localy. First I had the following error : 'dependencies.dependency.version' for org.jboss.shrinkwrap:shrinkwrap-extension-glassfish:jar is missing. @ line 43, column 19 I just added the version to pom.xml (1.0.0-alpha-12) and now I cannot install because the "IntegrationWarTestCase" fails on : Failed tests: shouldBeAbleToInjectEJBAsInstanceVariable(org.jboss.arquillian.container.glassfish.embedded_3_1.app.IntegrationWarTestCase) It seems that the test case in error was not able to inject the referenced EJB : @EJB private NoInterfaceEJB bean; @Test public void shouldBeAbleToInjectEJBAsInstanceVariable() throws Exception { Assert.assertNotNull( "Verify that the Bean has been injected" , bean); Assert.assertEquals( "Arquillian" , bean.getName()); } Having no clue why this could happend, I just installed it skipping the tests, and tried the installed snapshot on my project. The sun-resources.xml is deployed correctly : INFO: command add-resources result: PlainTextActionReporterSUCCESSDescription: add-resources AdminCommandnull JDBC connection pool jdbc/wakwi-pool created successfully. JDBC resource jdbc/wakwi-ds created successfully. However ... I have the problem that the ejb is not injected in my test. My test code : @RunWith (Arquillian. class ) public class TestFileManagementServiceTest {   @Deployment public static WebArchive createDeployment() { return ShrinkWrap.create(WebArchive. class , "testFileManagementService.war" ).addClasses( FileManagementService. class , File. class , Category. class , FileStore. class , CurrentFileStore. class , DefaultFileStore. class ). addAsResource( "test-persistence.xml" , ArchivePaths.create( "META-INF/persistence.xml" )). addAsResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml" ); } @EJB private FileManagementService service;   @Test public void testSaveFile() { assertNotNull( "Service should have been injected." , service); } } Do you have the same problem injecting an EJB using the branch ARQ-397 ? Is it related ?
          Hide
          aslak Aslak Knutsen added a comment -

          The branch was a bit outdated and not up to date with the latest arq core. I've pushed a new rebased branch: https://github.com/arquillian/arquillian-container-glassfish/tree/ARQ-397

          We currently have a issue with running with Embedded containers all together, ARQ-456

          Show
          aslak Aslak Knutsen added a comment - The branch was a bit outdated and not up to date with the latest arq core. I've pushed a new rebased branch: https://github.com/arquillian/arquillian-container-glassfish/tree/ARQ-397 We currently have a issue with running with Embedded containers all together, ARQ-456
          Hide
          aslak Aslak Knutsen added a comment -

          pushed upstream

          Show
          aslak Aslak Knutsen added a comment - pushed upstream

            People

            • Assignee:
              aslak Aslak Knutsen
              Reporter:
              aslak Aslak Knutsen
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development