5 Replies Latest reply on Aug 21, 2009 4:13 AM by jaikiran pai

    SLSBs and pooling

    Laird Nelson Apprentice

      Hello. I am trying to respond to an EJB3 objection. The objection states that the startup time that would result from trying to deploy a high number of stateless session beans is both high and untweakable.

      I'm familiar (now) with Glassfish, which sidesteps the issue entirely by not preallocating any stateless session beans at all (rendering the objection completely false and untenable). Here's the discussion thread over there: http://forums.java.net/jive/thread.jspa?messageID=361428&#361428

      I'm not as familiar with JBoss. Does JBoss pre-start a bunch of stateless session beans when they're deployed? If it does, is there a way to tune this pool?

      Thank you very much for your replies.

      Best,
      Laird

        • 1. Re: SLSBs and pooling
          Peter Johnson Master

          SLSBs are created only as needed - JBoss AS does not start a pool of them during intialization.

          • 2. Re: SLSBs and pooling
            Laird Nelson Apprentice

            Thank you very much for your reply.

            Can you think of anything else that would cause high numbers of stateless session beans to slow down the system at deployment time? The only thing I could think of would be establishing all the refs and links and performing injection.

            Thanks,
            Laird

            • 3. Re: SLSBs and pooling
              Peter Johnson Master

              Which version of AS? There are known issues with long deployment times in 5.x, with 5.1 being better than 5.0.1 which is better than 5.0.0. A quick scan of the JBossAS5 forum will show several posts about this.

              • 4. Re: SLSBs and pooling
                Laird Nelson Apprentice

                5.1 and following. I'll take a look.

                Thanks,
                Laird

                • 5. Re: SLSBs and pooling
                  jaikiran pai Master

                  As Peter mentioned, there have been deployment performance issues in AS-5. However, if you are using JBoss AS 5.1.0.GA then there have been many improvements. But the deployment timings don't yet match with the 4.x series of the AS.

                  See this thread for details about EJB3 deployment performance http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231116

                  As mentioned in that thread :

                  "jaikiran" wrote:

                  Feel free to report any improvement or if the timing remains the same. While reporting, please provide details about your application including :

                  1) Number of EJB3 beans
                  2) Approximate number of methods in each bean
                  3) Time it takes to deploy this single application (its recommended that you let the server start cleanly and once its started drop your application in the deploy folder so that you get an accurate timing for the deployment). If available, the time this application used to take without this new version of EJB3.
                  4) Any other information which you might feel is useful.
                  5) Operating system and machine configurations


                  While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.