Problem in assigning the execute queue to servlet in weblogic.

Discussions

Web tier: servlets, JSP, Web frameworks: Problem in assigning the execute queue to servlet in weblogic.

  1. I have a enterprise application in that a have many web application.I want to assign the low priority threads to one web application e.g. "A". The "A" is using one ejb to execute the some task.
    I am making a execute queue with name let "TestQueue"
    and assigning it to my servlet thru these entries in

    weblogic-ejb-jar :-

    <weblogic-enterprise-bean>
            <ejb-name>InferenceEngine</ejb-name>
            <reference-descriptor>
                <resource-description>
                    <res-ref-name>jdbc/MyDB</res-ref-name>
                    <jndi-name>jdbc/MyDB</jndi-name>
                </resource-description>
            </reference-descriptor>
            <jndi-name>ejb/InferenceEngine</jndi-name>
            <dispatch-policy>TestQueue</dispatch-policy>
        </weblogic-enterprise-bean>


    weblogic.xml:-

        <wl-dispatch-policy>TestQueue</wl-dispatch-policy>
     

    I have added this line in web.xml for my servlet <servlet> <servlet-name>MainServlet</servlet-name> <init-param> <param-name>wl-dispatch-policy</param-name> <param-value>TestQueue</param-value> </init-param> </servlet>


    But when i don't see the effect. All the requests for MainServlet are going to the default queue(weblogic.default) instead of my TestQueue.

    Do you any idea? Am I missing something?


    Regards
    Sunil Kumar Mehta
  2. Your setting seems to be Ok.
    Let me see your config.xml to make sure "TestQueue" is properly defined.
  3. Which version of WLS are you using?
    The wl-dispatch-policy parameter in weblogic.xml is available only on WLS6.1SP4+, WLS7.0SP1+ and WLS8.1GA+.
    Make sure you're using the latest version.
  4. Here is my code of config.xml file for execute queue.

    <?xml version="1.0" encoding="UTF-8"?>
    <Domain ConfigurationVersion="8.1.0.0" Name="ACM_1">
        <Server ListenAddress="" ListenPort="8003" Name="ACM"
            NativeIOEnabled="true" ReliableDeliveryPolicy="RMDefaultPolicy" ServerVersion="8.1.1.0">
            <SSL Enabled="false" HostnameVerificationIgnored="false"
                IdentityAndTrustLocations="KeyStores" Name="ACM"/>
            <ExecuteQueue Name="TestQueue" ThreadPriority="1"/>
        </Server>



    I tried the ejbc command line argument -dispatchPolicy TestQueue also. But it is also not sending request to my TestQueue.