3 Replies Latest reply on Jul 21, 2009 12:31 PM by peterj

    Any resource control in JBoss 5.1.0?

      Hi all,

      I want to know if any resource control is available in JBoss AS 5.1.0. With the following questions, I want to verify the ability of various setting/config in JBoss.

      1. Memory size can be set in a JBoss AS instance (one server). How about memory size for a web application? If we have 5 web applications, can we set the maximum memory size for each web application? How? In case, a web application use up all memory size that affect other web application.

      2. The thread size can be set in a JBoss AS instance too. How about the thread size for a web application? (almost same issue in memory ) How to set?

      3. The datasource pool size can be set in JBoss AS instance too. Can we set that one web application only can certain amount size of connection pool (datasource)? How?


      If anyone know any parameter can also set for a web application, not set in globally, welcome to state it here.

      Thanks for anyone help in advance.

        • 1. Re: Any resource control in JBoss 5.1.0?
          peterj

          1) Not possible - the heap is shared by all deployed apps and yes one app can hog all of the space (if it has a memory leak, for example)

          2) Not possible - all threads will have the same size. This is a JVM-wide setting

          3) You can do this by defining different datasources for each app. Of course, if all of those datasource use the same database then you must ensure that no data is cached or you will run into issues. (For example, Hibernate/JPA cache data by default because they assume they are the only users of the database.)

          • 2. Re: Any resource control in JBoss 5.1.0?

            Thanks for Peter help.

            Almost all resource cannot be set for a web application. These resource setting are for global. For avoiding that one web application used all resources (memory, thread, database connection pool), the only solution is to set individual instance (JBoss AS server) for a web application so that these web applications won't affect each other.

            Peter, what do you think?

            Does anyone have good suggestion? Thanks in advance.

            • 3. Re: Any resource control in JBoss 5.1.0?
              peterj

              Multiple apps can happily share one instance of JBoss AS. But if you need really high capacity, then it is often best to separate out the apps into separate app server instances to better manage and scale them. But that all depends on your needs. And for that you need to do some capacity planning.