1 Reply Latest reply on Jul 31, 2013 10:06 AM by thomas.diesler

    Best practices

    speleomaniaque

      Hey guys,.

       

      We will soon upgrade Web our application to work with JBoss 7 (runs on JBoss 5 at the moment) and I am also planing use some OSGi features on the way.

       

      I don't want to deploy the Web Application as bundle but convert the service layer to OSGi bundles. At the moment service layer of our application is built as JMX beans so converting them to OSGi bundles will not be big problem.

       

      My question is what is the best practice of accessing these bundles from web application (which iwill not be deployed as bundle), jndi, jmx?

       

      I used same design before in another project but with fuse and I exposed the service layer as web services with CXF but it was quite cumbersome. I hoping there is now better and easier way to do it.

       

      Thx for the answers.

       

      Hupps, just after I post this, I saw this thread

       

      https://community.jboss.org/thread/229889?tstart=0

       

      which will make selling this idea to my project managers much more difficult...

       

      I really like to bring the benefits of OSGI in our enterprise project, which way would you follow with above information, deploying web part to JBoss and Service Layer to JBoss Fuse?

        • 1. Re: Best practices
          thomas.diesler

          You can go ahead with WildFly if it is ok for your project that OSGi functionality is provided by a community project (like WildFly itself).  The product version of WildFly (i.e. EAP) does currently not include OSGi. 

          Depending on your application you might not need an AppServer at all, in which case Fuse Fabric would be the right choice for an OSGi based application.

           

          You can't mix the two in the same VM.

           

          In case you go with WildFly/OSGi you would stick OSGi metadata in your WAR's manifest, effectively making it an OSGi bundle. All the classloading details is been taken care of and you can use Import-Package for your service API's. Alternatively, there are other WF propriatary ways to create the correct module dependencies on your service API bundles, these however have no advantage over what I mentioned first.