13 Replies Latest reply on Mar 12, 2013 7:50 AM by jrantav

    Is anybody actually using OSGi/JBoss (any version) in a real world project?

    ralfoeldi

      Hi all,

       

      now I'm getting really curious. As nobody has responded to my question if anybody is using OSGi/JBoss 7.2.0 (https://community.jboss.org/thread/220441) I've changed the subject a bit:

       

      Is anybody using OSGi/JBoss (any version) in a real world project?

       

      @Thomas: I'm not trying to dis your project. I just want to figure out if I'm the problem, me being too stupid. And the question as such should be of interest to you too.

       

      Greetings from Switzerland

       

       

      Rainer

        • 1. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
          ulrichromahn

          Hi Rainer,

           

          to quickly respond to your quesiton above (and also to your other post), I am in the process of using JBoss AS with OSGi in a real world project.

           

          I first looked at JBoss AS 7.1.3.Final and noticed that several things with the JBoss OSGi integration that I would like to use are still not there and hence I started using JBoss 7.2.0-Alpha1-SNAPSHOT since then.

           

          And to comment on your issues: I completely understand and appreciate your troubles because IMHO JBoss/OSGi is just not there yet. I guess, that's why OSGi is still labeled as "Technology Preview" within the commercial EAP.

           

          However, since we will use JBoss more like a "toolbox" to build our next generation Java framework, it is more than good enough for us to start using it in anticipation that all the excellent work from the folks at JBoss/RedHat and especially from Thomas will lead to a great product with a unique integration between JEE and OSGi.

           

          Greetings to beautiful Switzerland from California,

          -Uli

          • 2. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
            ralfoeldi

            Hi Uli,

             

            in other words: no :-) It says a whole lot if it takes a week to get an answer to this sort of question.

             

            I gave up on OSGi/JBoss and am using my (our) own implementation of OSGi from way back in 2004 - on JBoss :-) It does everything I need it to do, except for classloader seperation.

             

            You say you are "in the process of using JBoss AS with OSGi". Does that mean you have a working development environment with multiple JARs, Bundles, WARs, EARs with continuous integration, deployments, builds etc.? That is the part that really didn't work for me (along with some other distractions).

             

            And again @Thomas: this isn't an attempt at dissing your project...

             

            Greetings from an indeed beautiful Switzerland to an equally - well some parts - California :-)

             

            Rainer

            • 3. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
              werrenmi

              Hi Rainer

               

              We use JBoss AS 7.1.1.Final (Switchyard) and OSGi together with CDI deployments because of Switchyard.

               

              But our Project is really young. I like all JBoss Projects i used till now, and my focus is on JBoss Techs. Because that, when it run with JBoss techs, then they will be used

               

              Both, OSGi and CDI deployments runs great when they dont need to talk together. At the moment i try to find a solution for a classloading issue with the injected BundleContext reference in a war module: https://community.jboss.org/thread/220708?tstart=0

               

              Greetings also from Switerland

               

              Michel

              • 4. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                ulrichromahn

                Rainer,

                 

                we are not using it to the extend you were describing - we are just starting to set everything up.

                But, as I mentioned in my original reply, we are using JBoss more as a "toolbox" rather than a "shrink-wrapped" piece of software. That implies that we will heavily disect JBoss and plan to make some fundamental changes/enhancements to it which we eventually will push back to the community (if my lawyers allow me to do that).

                 

                We originally started our first attempts using Apache Karaf, but what pulled me to JBoss AS/JBoss OSGi was the fact that Thomas outlined a great roadmap to blur the boundaries between OSGi and JEE.

                I could write a long article about this, but at this point in time my lips have to be tight (my company's patent lawyers make me do that).

                Again, I also believe that JBoss AS7 and JBoss OSGi have still ways to go, but it already has the big potential to actually get there. (Caveat: I am only talking about the latest 7.2.0.Alpha1-SNAPSHOT).

                 

                Also, and I know I am digressing now, you are "putting water under the bridge": I am well aware of the beauty of Switzerland as I have lived myself in Zurich for three years and are still missing it big time (after having moved away 13 years ago).

                 

                -Uli

                 

                P.S. I would have responded earlier, but I was out sick and did not monitor the discussions nor my email for almost one week.

                P.P.S. Michel: I will respond to your question on the other thread you linked to.

                • 5. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                  ralfoeldi

                  (My last comment here because I'm basically saying ditch JBoss/OSGi, which isn't fair in the JBoss/OSGi Forum)

                   

                  Michel,

                   

                  check what you really need OSGi for.

                   

                  I'm using it as a framework from which I can retrieve services based on certain factors with enough metadata to get "best" or "most adaquate" services for a user. (Sorted arrays of ServiceReferences depending on any kind of meta data.)

                   

                  I do not need dynamic bundle deployment and I doubt if any real world business application running on a JBoss Enterprise Application Server will ever(!) actually need that. I do not need classloader seperation.

                   

                  So what I am doing now - with a lot less pain than with JBoss/OSGi - is create a Felix Framework instance in a Singleton Managed Bean. Use that as system context, register all services with that context and presto: it works :-) Hooking that up took about 2-3 hours. You're back to classic JEE programming with all (most) benefits of OSGi.

                   

                  Everything is packaged in a nice standard EAR file. (Re)Deployment works, classloadings poses no problem.

                   

                  So as Thomas mentioned in some blog or forum post: maybe you don't need JBoss/OSGi to achieve what you want. (Thomas, you were actively discouraging someone from using JBoss/OSGi, I just don't have the link anymore.)

                   

                   

                  Greeting from Switzerland

                   

                  Rainer

                  • 6. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                    jrantav

                    I do not need dynamic bundle deployment and I doubt if any real world business application running on a JBoss Enterprise Application Server will ever(!) actually need that.

                     

                    Well, we need dynamic bundle deployment with our app server, where we have 100+ applications running at the same time, and we certainly want and need the modularity as much as possible. Before OSGi, our main way-of-working was using EJBs. That works but is hardly ideal.

                     

                    So what I am doing now - with a lot less pain than with JBoss/OSGi - is create a Felix Framework instance in a Singleton Managed Bean. Use that as system context, register all services with that context and presto: it works :-) Hooking that up took about 2-3 hours. You're back to classic JEE programming with all (most) benefits of OSGi.

                     

                    Everything is packaged in a nice standard EAR file. (Re)Deployment works, classloadings poses no problem.

                     

                    So... if everything is packaged in an EAR file, what are the benefits of OSGi that you're actually getting? I mean, wouldn't you then have to redeploy the whole ear, thus not getting the modularity benefits? If felix framework is wired from a bean, how do you hook up to that from other deployment units, or do you do that at all?

                     

                    It does sound interesting though. I would be interested to hear more details about it. Does sharing transactions across different osgi bundles/deployment units work, do jndi lookups all around work, does AOP work, does security context works correctly across bundles, can you share sessions...?

                    • 7. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                      ralfoeldi

                      Hi Jarkko,

                       

                      you seem to work for Accenture. That alone would be reason enough not to answer :-) (Are you one of the "has to be there in order to bill hours" guys or do you actually do something? :-)

                       

                      OSGi is the opposite of dependency injection. You pull resources according to whatever properties might be applicable. The resources you pull might be different for every method call. That alone is a major benefit of OSGi and makes all kinds of structures possible that would otherwise not be possible or very hard to build. OSGi for me is a grab bag of resources you can access by LDAP notation.

                       

                      The dynamic deployment is - for me - only a minor part of OSGi coming from it's origins in embedded devices et. al.

                       

                      This approach only works inside of one deployment unit, so no access via OSGi to other services on the app server and yes, you would have to deploy the whole EAR. But so what? Where's the problem with that?

                       

                      Everything else works exactly as expected from a JEE app server (transactions, jndi, etc.) The way I'm using Felix its "just" a utility framewok inside a JEE app.

                       

                      But having answered - I hope - your questions: do you actually use (JBoss/)OSGi to manage/run/integrate 100+ apps?

                       

                      Greetings from Switzerland

                       

                      Rainer

                       

                      P.S.: Sorry about the Accenture jibe. There are some few very good people there, but only very few. And after more than one project with Accenture, you get slightly aggressive.

                      • 8. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                        jrantav

                        Hi Rainer,

                         

                        and greetings from Finland :)

                        OSGi is the opposite of dependency injection. You pull resources according to whatever properties might be applicable. The resources you pull might be different for every method call. That alone is a major benefit of OSGi and makes all kinds of structures possible that would otherwise not be possible or very hard to build. OSGi for me is a grab bag of resources you can access by LDAP notation.

                         

                        The dynamic deployment is - for me - only a minor part of OSGi coming from it's origins in embedded devices et. al.

                         

                        I think this depends on the usage. For example, if you go from spring DI to gemini blueprint DI, which is using OSGi, you don't pull that much, and I wouldn't really call it going the opposite way. But ok, I understand your viewpoint better now.

                         

                        But having answered - I hope - your questions: do you actually use (JBoss/)OSGi to manage/run/integrate 100+ apps?

                         

                        No, not at least currently. There are plans that are being considered, and testing to be done. I do see a use case however.

                         

                        P.S.: Sorry about the Accenture jibe. There are some few very good people there, but only very few. And after more than one project with Accenture, you get slightly aggressive.

                         

                        Yeah, well. It's a big company. I can not speak for others, let alone what happens in other countries except my own - I can speak for myself as always having been involved in hands-on work.

                         

                        P.S. did you get that EJB stuff working?

                        • 9. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                          ralfoeldi

                          Hi Jarkko,

                           

                          yeah, the "EJB Stuff" :-) "worked", but it was cumbersome, broke on redeployment, etc. etc.

                           

                          If you're building an app and have to restart the server every time you redeploy because components get in each others way or the order of starting up is undefined (start 5 times until you happen to get the right order) .... well you've got a problem.

                           

                          But I'm humble enough to see the possiblity that I'm just too stupid to make it work. That's why I was asking if anybody is using JBoss/OSGi in a real world project. But it seams no ones out there....

                           

                          Rainer

                          • 10. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                            jrantav

                            Hi Rainer,

                            If you're building an app and have to restart the server every time you redeploy because components get in each others way or the order of starting up is undefined (start 5 times until you happen to get the right order) .... well you've got a problem.

                            Agreed. But I guess that's at least supposedly fixed with this one: https://issues.jboss.org/browse/AS7-5951

                            • 11. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                              thomas.diesler

                              Specific problem descriptions help to keep a discussion constructive. So, if you have something specific that doesn't work in current master I like to know about it.

                              • 12. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                                ralfoeldi

                                Hi Thomas,

                                 

                                its a few weeks since I quit on JBoss/OSGi so this is just from memory:

                                 

                                What wasn't working was a real world project with Maven redeployments. Code, build, (re)deploy (only the affected bundle), repeat. Services dependencies got messed up and only came up correctly after a server restart. Even that didn't always work, because - as you've fixed by now - the start order was arbitrary. It would work - somehow - but I was wasting 80% of my time on JBoss/OSGi issues.

                                 

                                There is always the possibility that I'm just to plain stupid to get it right. No problem with that. I'd just get some other job.

                                 

                                So I asked if anybody is actually using JBoss/OSGi in a real world project. If there is someboby, well then maybe I'm to stupid. But there isn't anyboby.

                                 

                                That is all I wanted to find out with this post.

                                 

                                Specific problem descriptions are a major effort, especially if something is going wrong in a complex system like the classloading of an App Server. 8 years ago I was able to patch the then current Websphere. Today? No chance.

                                 

                                And to be quite honest: you've refused to give real world example code in various threads, referring instead to test cases. That's simply not enough. Maybe a specific problem description would be: not tested against a real world project.

                                 

                                Greetings

                                 

                                Rainer

                                • 13. Re: Is anybody actually using OSGi/JBoss (any version) in a real world project?
                                  jrantav

                                  A note: one reason that it probably isn't used in at least enterprise-level real world projects is that OSGi is still "Technology preview" in EAP. Thus there is no official support for it currently. When it will be a regular supported component, such as jboss modules already is, the enterprise world can start building on it.

                                   

                                  But I do realize we're talking in the community world here, just wanted to mention it.