6 Replies Latest reply on Feb 27, 2012 1:25 PM by rogelio_sevilla1

    Best way to insert an old app into fuse

    rogelio_sevilla1

      Good day everyone,

       

      I want to deploy an old application within Fuse ESB but honestly I don't really now what would be the best strategy to achieve that.

       

      This application needs quite a lot of old libraries like c3p0 0.9.1, hibernate 3.2.5 , castor  3.2.1, drools 4.0.7 and many many more.

       

      My initial strategy was to convert all of this libraries into bundles using the bnd tool, and deploy them as a feature. However, that would mean a LOT of work considering that I have to verify that every exported package is versioned, and I'm talking around 35-40 libraries and obviously quite a lot of packages.

       

      I just wanted to check with you if there's another (better) way of achieving this or if I should re think the strategy??

       

       

      Thanks a lo in advance for your time.

        • 1. Re: Best way to insert an old app into fuse
          davsclaus

          Have you tried a WAR with all the old JARs embedded.

          • 2. Re: Best way to insert an old app into fuse
            rogelio_sevilla1

            Haven't tried that, I will check that way. Thanks for the answer mr. Claus.

            • 3. Re: Best way to insert an old app into fuse
              davsclaus

              If you install from the shell, then there is a special war url handler. See docs here

              http://fusesource.com/docs/esb/4.4.1/esb_deploy_osgi/UrlHandlers-War.html

              • 4. Re: Best way to insert an old app into fuse
                rogelio_sevilla1

                Thanks a lot for the answer Mr. Claus. I was wondering, If I want to deploy a zip file with a bunch of jars, is there any way to deploy it like the war file??.

                 

                I mean, if I understand correctly, when a war file is deployed, the Bundle-ClassPath gets all the resources contained within the WEB-INF/lib folder, even if the jars in there are not bundles; that means that only the war bundle knows about these jars and packages.

                 

                 

                This is the exact behavior I'm looking to recreate in this particular case, but without using a war file. I would like to know a way to isolate a group of jar files so that only a certain bundle know about their existence, without having to export all the packages and affecting the whole ESB environment on the way.

                 

                Would this be doable with a custom class loader???, any good resource you could point me to??

                 

                 

                Thanks A LOT in advance for your time.

                • 5. Re: Best way to insert an old app into fuse
                  davsclaus

                  If your application is a zip file, how would you kick-start your application?

                   

                  A WAR file is a wide-spread standard, and it does not have to be a web application. Just that there is a WEB-INF/web.xml to kick-start your application.

                   

                  An alternative packaging would be a JEE application which can be a ZIP file. But then you can only deploy that into a JEE application server.

                   

                  For OSGi there is works at the Apache Karaf project to support a KAR archive (its a zip file renamed as .kar instead). I think that is planned for Karaf 3.0.

                   

                  For now I would recommend a WAR file. Everybody knows that, and there is tooling, websites, and whatnot that tells you how to work and package such an archive.

                   

                  That said, we at FuseSource have on our roadmap to make it easier to deploy OSGi applications. So keep an eye out this year, when we have more details to share in the public.

                  • 6. Re: Best way to insert an old app into fuse
                    rogelio_sevilla1

                    Definitely easier  :-D, thanks a lot mr Claus.