3 Replies Latest reply on Mar 1, 2011 8:28 AM by wdfink

    JBoss 5.1 Parallel Processing

    james.gingerich

      Our application has parts that need to run in parallel within an Application Server.  This includes JMS queus and topics, scheduled jobs (Quartz), and silimar functionality.  These parts need their own dedicated resources so they don't starve each other.  We are currently using several ExecutorService thread pools.

       

      It has been brough to our attention that using unmanged threads within a container is a bad and non-standard solution.  In addition, we would like the added functionality of dynamically scaling the size of the pools.  It seemed that leaveraging WorkManager would sovle both problems.

       

      We are using JBoss AS 5.1 and it appears that WorkManager is not available via JNDI (unlike in WebSphere AS).  Furthermore, Weston comments that JBoss WorkManager is reserved for use for Resource Adapaters (http://community.jboss.org/message/243460).  Weston suggests the notion of creating a custom MBean to achive this functionality.

       

      What is the JBoss way for achiving parallel processing?  Is there a better way to solve these problems?

        • 1. JBoss 5.1 Parallel Processing
          wdfink

          Starting threads within the application server can be difficult, we often detect that there are better solutions, the resource handling is often not so easy as expected.

          Often there is a async solution with JMS possible, but I wait also for EJB3.1 and future objects.

          A resource adapter might alos a possible solution.

           

          But what you mean by 'our application' it help to give a more specific answer if you provide details about the current implementation. What do you use EJB, servlet ....?

          • 2. JBoss 5.1 Parallel Processing
            james.gingerich

            The application is a web application along with asynchronous background processing.  No EJBs but do have servlets, web services, quartz jobs, JMS queues/topics.  Servlets, web services, and centralized file storage asynchronously fire jobs/messages.  Quartz process x jobs in parallel, and JMS queues/topics process y messages in parallel.  Currently the processing is done in the application server using Spring wrappers around thread pools, say pool x and pool y.

            • 3. JBoss 5.1 Parallel Processing
              wdfink

              Quarz Jobs, Queues and topics are managed by JBoss and this is a normal usage.

              About Spring I'm unsure, I never used it. Threads here might be allowed by spec.