|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Using Multiple JVMs with WebClient |
« View previous topic :: View next topic » |
Author |
Message
|
drgincbia |
Posted: Wed Feb 11, 2004 5:06 am Post subject: Using Multiple JVMs with WebClient |
|
|
Apprentice
Joined: 23 Dec 2003 Posts: 35 Location: Omaha NE
|
We want to run the workflow applications in a separate JVM than the WebClient, so that each application does not impact the stability of the WebClient and other workflow applications. Here is what has been tried, but does not work. Can someone give us pointers on what code needs to change to accomplish this?
Target environment
WAS Ver 5.0.2 on AIX Ver 5.1, Workflow 3.4 SP 4
Summary
We have written a sample Web application (TEST) that interacts with the WF WebClient. The WebClient is currently installed to Application server (JVM1) within a Cluster (Cluster1) and the TEST application is also installed to the same Application server (JVM1) within the same Cluster (Cluster1). By installing the application this way both the application works well using the code below.
Question
We would like to move the TEST application to a different Application Server (JVM2) within a different Cluster (Cluster2) , so we can maintain the applications individually without impacting one another. (Recycle JVM2 without disturbing other WF applications, or other WF applications may not be impacted when the TEST application is being redeployed)
Configuration that did not work with the same code below
We tried to install the TEST to JVM2 in Cluster2 and got an error 500.
Sequential flow of the Sample application
1. The user logs into the WF WebClient application and sees his/her workitem.
2. User clicks on the workitem that launches the custom jsp (INF_JVMDocs.jsp ) in the /programs/ folder.
3. The custom jsp then forwards the user to a servlet (TestServlet ) in the TEST application
4. The servlet stores the context root of the WF in a session then transfers control to the JVMDocs.jsp within the TEST application
5. The jsp (JVMDocs.jsp) uses the session information to transfer the control back to the Workitem in the WF WebClient application
Sample source code that is being used
INF_JVMDocs.jsp located in WebClient /programs/ folder
TestServlet in the TEST application
<!-- INF_JVMDocs.jsp -->
<%@ page language="java" %>
<%!
ServletContext mycontext;
String Testcontext ="/test";
public void jspInit() {
mycontext = getServletConfig().getServletContext();
}
%>
<%
ServletContext context = mycontext.getContext(Testcontext);
RequestDispatcher rd = context.getRequestDispatcher("/TestServlet");
rd.forward(request,response);
%>
/*
* TestServlet
*/
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.ibm.workflow.servlet.client.RequestContext;
/**
* @version 1.0
* @author
*/
public class TestServlet extends HttpServlet {
/**
* @see javax.servlet.http.HttpServlet#void (javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
doPost(req,resp);
}
/**
* @see javax.servlet.http.HttpServlet#void (javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
RequestContext mqcontext = (RequestContext) req.getAttribute("context");
HttpSession ses = req.getSession(true);
ses.setAttribute("mqcontext", mqcontext);
RequestDispatcher rd = req.getRequestDispatcher("/test.jsp");
rd.forward(req,resp);
}
}
Suggestions? _________________ D. Grandia |
|
Back to top |
|
 |
vennela |
Posted: Wed Feb 11, 2004 8:03 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
I think if you just create another Java agent then that should be enough. What kind of CLUSTER are we talking about. MQ Cluster? |
|
Back to top |
|
 |
Prabhakar |
Posted: Wed Feb 11, 2004 8:36 am Post subject: |
|
|
Newbie
Joined: 08 Jan 2004 Posts: 6
|
We are talking about Server cluster in WebSphere 5.0.2. I would want to eventually have two server clusters(which will inturn have 2 different Application server) and work the same as installed to one Cluster. But, it does not work and I get an Error 500.
Remember I am using session to store the context roots.
give me some suggestions
Vijay[/img] |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|