3 Replies Latest reply: Jun 12, 2012 10:04 AM by 929255 RSS

    Work Manager question

    929255
      Hello,

      I have configured a certain MDB (EJB 3.0 compliant) to be executed on a specific thread pool, by using a work manager.
      However, in the EJB application view > Monitoring > Workload, I can see that my application is also made available through the default thread pool as well.


      Name      Server      Application      Pending Requests      Completed Requests
      default     bus_server1     MyApp     0     2
      default     bus_server2     MyApp     0     0
      MyWorkManager     bus_server1     MyApp     0     0
      MyWorkManager     bus_server2     MyApp     0     0


      I specified the work manager through the weblogic-ejb-jar, as follows:

           <work-manager>
                <name>MyWorkManager</name>
                <min-threads-constraint>
                <name>MyWorkManagerMinThreads</name>
                <count>5</count>
                </min-threads-constraint>
                <max-threads-constraint>
                     <name>MyWorkManagerMaxThreads</name>
                     <count>20</count>
                </max-threads-constraint>
                <!--capacity>
                     <name>MyWorkManagerCapacity</name>
                     <count>0</count>
                </capacity-->
           </work-manager>

      Note that the capacity tag is commented out. Do I need that?
      Do I need to specify anything else, to exclude the default thread pool? I am doing sth else wrong?

      Thank you
        • 1. Re: Work Manager question
          Arunbodap-Oracle
          Probably you have missed configuring a dispatch policy for the MDB as shown below:
          <weblogic-enterprise-bean>
          <ejb-name>MyMDB</ejb-name>
          <jndi-name>myMDB</jndi-name>
          ......
          ......
          <dispatch-policy>MyWorkManager</dispatch-policy>
          </weblogic-enterprise-bean>

          The above configuration is in the same "weblogic-ejb-jar.xml" file where the workmanager configuration is specified.


          Arun
          • 2. Re: Work Manager question
            929255
            Thanks for the suggestion,

            Here is my complete weblogic-jar-xml:

            <?xml version="1.0" encoding="UTF-8"?>
            <weblogic-ejb-jar xmlns="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.2/weblogic-ejb-jar.xsd">
                 <weblogic-enterprise-bean>
                      <ejb-name>MyMDB</ejb-name>
                      <message-driven-descriptor>
                           <pool>
                                <max-beans-in-free-pool>10</max-beans-in-free-pool>
                                <initial-beans-in-free-pool>8</initial-beans-in-free-pool>
                           </pool>
                           <destination-jndi-name>MyJMSQueue</destination-jndi-name>
                      </message-driven-descriptor>
                      <dispatch-policy>MyWorkManager</dispatch-policy>
                 </weblogic-enterprise-bean>
                 <work-manager>
                      <name>MyWorkManager</name>
                      <min-threads-constraint>
                      <name>MyWorkManagerMinThreads</name>
                      <count>10</count>
                      </min-threads-constraint>
                      <max-threads-constraint>
                           <name>MyWorkManagerMaxThreads</name>
                           <count>20</count>
                      </max-threads-constraint>
                      <!--capacity>
                           <name>MyWorkManagerCapacity</name>
                           <count>0</count>
                      </capacity-->
                 </work-manager>
            </weblogic-ejb-jar>
            • 3. Re: Work Manager question
              929255
              Maybe I did not make clear that the file descriptor that I posted earlier is the one I already had in place, and that i still have the same problem!
              (Still hoping for an answer!)

              Thanks