Jay SenSharma

Jay SenSharma

If you want to Assign a Global Work Manager (A Work Manager which is created through AdminConsole).. And if you want more than 1-Thread should not be allocated by the WebLogic to process request for your WebApplication…then you can do the Following:

Provide the Capacity-Constraint to 1

Step1). Configure a WorkManager from Admin Console.

with the following Configuration: in your “config.xml”





Note: After configuring the above workManager we need to restart the Server…
Step2). Write a Simple WebApplication with the following kind of JSP Page:
<%@ page import="java.util.*" %>
static int counter=0;
for(int id=0;id<60;id++)
System.out.println(id+"tRequest Is Being Processsed for :"+(String)session.getAttribute("counter"));
catch(Exception e)
out.println("<h2>Request Processing Completed");
Step3). Now provide the “weblogic.xml” bu providing the Work-Manager name in wl-dispatch-policy annotation:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90">
Step4). Now deploy the Application and And
you can check it from admin console as well..

AdminConsole–> Home–>Deployment Summary–> (click on your WebApp)–>Monitoring (Tab)—> WorkLoad (Sub-Tab)

Hit your WebApplication and then See …in admin Console…How many request is being processed…

When you send the Concurrent Second request to the WebApplication you will get 503-Service Not Available Error By the WebLogic Server…Because of the Constraint Capicity=1 …weblogic will process only 1 Concurrent request for your WebApplication.




Jay SenSharma

If you enjoyed this post, please considerleaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.