12 Replies Latest reply on Jun 2, 2015 10:47 AM by jeffmaury

    IBM Websphere 6.1 container

    jeffmaury

      Hello,

       

      I need to validate my JCA connector against IBM Websphere 6.1. Do you know if there is an Arquillian container available somewhere ?

       

      Jeff

        • 1. Re: IBM Websphere 6.1 container
          gpoul

          I need to validate my JCA connector against IBM Websphere 6.1. Do you know if there is an Arquillian container available somewhere ?

           

          Currently there is no WAS V6.1 container, but it might be easy for you to reuse our WAS V7 container and re-target it for WAS V6. I'm a little careful with that because we haven't tested it and there might be unintentional use of a V7.0 and later behavior, but I think there would be a good chance that our code would work largely unmodified for WAS V6.1. - The reason we've never built container support for V6.1 is that it went out of support on September 30, 2013.

          • 2. Re: IBM Websphere 6.1 container
            jeffmaury

            That's exactly what I tried but I'm facing a problem with the JEE version supported. Although the application.xml I inject in my application has a property DOCTYPE instruction, it is rewritten by Arquillian in order to include the arquillian JARs and the DOCTYPE is removed. And when the application is deployed on WAS, WAS cannot parse it. So I'm trying to find a solution/workaround but I'm afraid Arquillian requires a minimum JEE version that is not provided by WAS 6.1

            • 3. Re: IBM Websphere 6.1 container
              gpoul

              What type is the artifact that you supply to the container implementation? If it is a WebArchive or a JAR I would expect us to bundle it inside of an EAR and generate the application.xml, but if you supply us an EnterpriseArchive, we will not touch it. Is this the behavior you're seeing? Do you think this would help you in achieving what you're trying to do?

              • 4. Re: IBM Websphere 6.1 container
                jeffmaury

                I am deploying an EnterpriseArchive because I am testing a JCA implementation. So my EnterpriseArchive contains a connector and a JAR for the test classes. I am building the EAR with my own application.xml that has a DOCTYPE and what I am seeing is that the EnterpriseArchive that is given to the container implementation has not the DOCTYPE anymore.

                What I am looking is where the archive is modified to add the Arquillian JARs in order to see if I can inject some kind of handler that could keep the DOCTYPE.

                • 5. Re: IBM Websphere 6.1 container
                  gpoul

                  Is this something you're only seeing with the WAS container implementation? Depending on what you're seeing I see two ways of that happening

                   

                  (1) the deployment code from WebSphere that we're using is changing it

                  (2) the Arquillian code actually adding the JARs to the EAR is doing this, but this would be seen on any container, not only WAS.

                   

                  Do you have a way of figuring out where this happens? I'm relatively certain that this is not being done by the WAS container implementation.


                  aslak What do you think?

                  • 6. Re: IBM Websphere 6.1 container
                    jeffmaury

                    I don't think this is related to the WebSphere code because I am comparing the output of the method that build the EnterpriseArchive from my test class and the input of the Websphere container implementation.

                    My guess is that this change is performed by the Arquillian code and that is does not cause problem on other versions of Websphere because they don't required the DOCTYPE to be present because it is schema based now.

                    • 7. Re: IBM Websphere 6.1 container
                      gpoul

                      hmmm... you might be right; maybe aslak can provide some more info, but as far as I can tell the servlet 2.5 protocol from arquillian-core is used by arquillian-container-was-7, so this will in your case probably run into this line: https://github.com/arquillian/arquillian-core/blob/597373b680ddd361a8763ccc931033d9cb9c43e5/protocols/servlet/src/main/java/org/jboss/arquillian/protocol/servlet/v_2_5/ServletProtocolDeploymentPackager.java#L171

                       

                      But this is only a guess from reading the source and guessing what might happen. This code parses the application XML and changes it, so maybe that is where your DOCTYPE disappears.

                       

                      Are you only missing the DOCTYPE? If yes, you might want to try to reproduce this only using jboss-shrinkwrap and getting it fixed there. The above code reference should give you enough details on how shrinkwrap is used to confirm whether it reproduces or not.

                      • 8. Re: IBM Websphere 6.1 container
                        jeffmaury

                        Cool. This will give me the pointers for a better debugging session but looking at the code, it seems this ressemble 100% to my case. I will debug it tomorrow and let you know.

                        • 9. Re: IBM Websphere 6.1 container
                          jeffmaury

                          I did a debug session and you were right, this is the section of the code I'm running into. So I checked the code and I think this will not be possible to keep the DOCTYPE as shrinkwrap uses a model that is build from the DOM but this model is built from the document element and not from the document itself so the document type is lost. I will try to code in the WebsphereRemoteContainer a method that checks if the DocumentType is present in the application.xml and add it if no but I'm afraid if I will no get the same errors with other descriptors ?

                          • 10. Re: IBM Websphere 6.1 container
                            gpoul

                            Good question, I'm not really sure. I'm afraid the only way to find out is to test it :-(

                            • 11. Re: IBM Websphere 6.1 container
                              jeffmaury

                              Yes, I will test and let you know

                              • 12. Re: IBM Websphere 6.1 container
                                jeffmaury

                                I managed to deploy the EAR on WebSphere by adding the DOCTYPE to the application.xml in the WebSphereRemoteContainer. But I am know facing another issue. The Servlet 2.5 protocol is assuming JAR under the /lib folder in the EAR are visible for the other components (WebModule, RAR) but this is not the case in WAS 6.1 which is based on J2EE 1.4. Need to think about how to fix it