12 Replies Latest reply on Nov 18, 2008 10:03 AM by jhalliday

    bundling JTS into AS 5.0

    jhalliday

      So I'm mulling over how best to include JTS into AS 5.0. Right now it's a separate download and manual install, which sucks.

      We should ship the necessary .jar and config files in the AS and either have a server with it already installed (e.g. 'default', 'all', 'all-jts') or at least provide scripting for as much of the install as possible (e.g. 'ant -f install-jts-to-server-all.xml')

      There are a few complications: the .jar files and config files for JTA and JTS don't cohabit well. Having both on the classpath is asking for trouble, so we can't simply dump them both into 'all' and use the transaction-beans.xml to switch between them. Installing the JTS requires first uninstalling the JTA.

      Right now I'm leaning towards editing the JBossAS build process so it pulls the JTS .jars and config file from the maven repo and puts them in docs/examples/jts along with an ant script that will copy 'all' to 'all-jts', ripping out the JTA and putting in the JTS in the process. There may be some bits of that process that will be tricky to automate fully as it requires editing existing xml files, but it should be possible to automate most of it. This approach makes for a smaller AS distribution footprint than providing a full server subdir with the jts in, as the cost of being less convenient for customers who do need the JTS.

      Any further thoughts from the JBossAS side of the house before I start in on this?

        • 1. Re: bundling JTS into AS 5.0
          starksm64

          I think that is the best approach for now.

          • 2. Re: bundling JTS into AS 5.0
            jhalliday

            ok, I've got the maven packaging for jts done and the app server build process updated to put the .jar files in the right place. I can't check it in yet as that would mean moving AS trunk to a JBossTS snapshot release, so it will have to wait a bit.

            Meanwhile the remaining question is: where should the instructions and install script live? They can either go into the JBossTS repository and be installed via maven artefacts, or they can go into the AS repository varia/jts maybe? - I'm not too familiar with the project layout. My preference is to put them with the AS.

            • 3. Re: bundling JTS into AS 5.0

               

              "jhalliday" wrote:
              ok, I've got the maven packaging for jts done and the app server build process updated to put the .jar files in the right place. I can't check it in yet as that would mean moving AS trunk to a JBossTS snapshot release, so it will have to wait a bit.

              Meanwhile the remaining question is: where should the instructions and install script live? They can either go into the JBossTS repository and be installed via maven artefacts, or they can go into the AS repository varia/jts maybe? - I'm not too familiar with the project layout. My preference is to put them with the AS.


              Create a subproject in jboss-head/jbossas, then copy the from there script into
              build/output/jboss-version/docs/examples/jts so it is included within the release.

              You might also want to create a test config within the teststuite to validate
              noboby breaks it.

              • 4. Re: bundling JTS into AS 5.0
                jhalliday

                Sorry Adrian, it's Friday and I'm doing my best impression of an ignorant idiot: What's a subproject and why would I want one? I just need someplace to put a couple of files. I think it's call a 'directory'?

                • 5. Re: bundling JTS into AS 5.0

                   

                  "jhalliday" wrote:
                  Sorry Adrian, it's Friday and I'm doing my best impression of an ignorant idiot: What's a subproject and why would I want one? I just need someplace to put a couple of files. I think it's call a 'directory'?


                  You mean a "dumping ground" :-)
                  That's what varia is.

                  A subproject is defined in here for the old build:
                  http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/build/build.xml?revision=76997&view=markup
                  and here for the new build
                  http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/jbossas/pom.xml?revision=70516&view=markup

                  The jbossas part of jboss-head (though originallly not intended for that purpose)
                  is meant now to be the place where you integrate thirdparty components
                  so you can see what their individual dependencies are instead of a build ball of mud
                  like varia.

                  For more of my opinion of varia, see the "VARIA MUST DIE" thread in the MC forum. ;-)


                  • 6. Re: bundling JTS into AS 5.0
                    jhalliday

                    Umm, JBossTS is already integrated. The AS build system handles the .jar versioning just fine, thanks. All I need to do is add a couple of text files to the AS. You seem to be telling me that requires messing around with maven artefacts, poms and such. No wonder this thing is behind schedule if it's that hard to get anything done. varia needs to stay, it's far more suitable for my needs :-)

                    • 7. Re: bundling JTS into AS 5.0

                       

                      "jhalliday" wrote:
                      Umm, JBossTS is already integrated. The AS build system handles the .jar versioning just fine, thanks.


                      Only because you do all the integration in your project which is the wrong way around.


                      All I need to do is add a couple of text files to the AS.


                      Configuration is also integration.


                      You seem to be telling me that requires messing around with maven artefacts, poms and such. No wonder this thing is behind schedule if it's that hard to get anything done. varia needs to stay, it's far more suitable for my needs :-)


                      It's even more delayed/broken when to do a simple fix to the integration
                      (not the implementation) needs a whole new release cycle of a dependent project
                      and makes integration with other versions impossible.

                      Implementation -> your project
                      policy == integration -> jbossas

                      I've had this argument with the aop, jboss messaging, remoting and webservices projects,
                      so far I'm winning, but only just.
                      I'm only winning when I find out somebody is doing it wrong. ;-)

                      By way of an example, I'm going to need a jbosstm integration project in jbossas
                      to fix the "port" problem we were discussing, i.e. replace the GUID mechanism.

                      Now if my mechanism is generic, I can contribute it back to JBossTM.
                      If it is a JBossAS specific mechanism then it belongs in that source tree.

                      The real test is whether you created a circular dependency in your build:

                      jbossas -> jbossts -> jbossas

                      In your case, it's even worse (you have the same problem jbossws used to have).
                      You're not even compiling over a version controlled version of jboss

                       <condition property="jboss.home" value="${env.JBOSS_HOME}">
                       <isset property="env.JBOSS_HOME"/>
                       </condition>
                      
                       <path id="build.classpath">
                       <fileset dir="${com.arjuna.mwlabs.installation.lib.directory}">
                       <include name="**/*.jar"/>
                       <include name="**/*.zip"/>
                       </fileset>
                       <filelist dir="${jboss.lib.dir}" files="${jboss.libs}"/>
                       <filelist dir="${jboss.client.lib.dir}" files="${jboss.client.libs}"/>
                       <filelist dir="${jboss.server.lib.dir}" files="${jboss.server.libs}"/>
                       </path>
                      


                      Who knows how to reproduce you're binaries?

                      • 8. Re: bundling JTS into AS 5.0

                        That's from
                        http://viewvc.jboss.org/cgi-bin/viewvc.cgi/labs/labs/jbosstm/trunk/atsintegration/build.xml?revision=20295&view=markup
                        which might be the for 4.2 build for all I know which doesn't have the integarion spi? ;-)

                        • 9. Re: bundling JTS into AS 5.0
                          jhalliday

                          ok, so I create a subdirectory under trunk/jbossas and put my jts related files in it. Now what? Hacking build/build-distr.xml to copy them into docs/examples/jts would take 30 seconds but is presumably frowned upon as further contributing to the ball of mud?

                          • 10. Re: bundling JTS into AS 5.0

                            Why? That's exactly what you should do.
                            The "big ball of mud" is varia.
                            jbossas/jts and docs/examples/jts
                            are well defined places that are easy to identify.

                            • 11. Re: bundling JTS into AS 5.0
                              istudens

                              I wrote an ant script which can do all of the manual stuff from the JTS installation according to the README file in docs/examples/jts. I need it for the hudson. If there is anyone who is interested in it the script is here:

                              http://jboss-wiki.brq.redhat.com/istudens?action=AttachFile&do=get&target=manual-install-jts.xml

                              • 12. Re: bundling JTS into AS 5.0
                                jhalliday

                                Thanks Ivo. I've put that into AS trunk and updated the rest of the install process to cope with the new AS lib dir layout too.
                                https://jira.jboss.org/jira/browse/JBAS-6207