jQuery in Action, 2nd edition*
The moose likes BEA/Weblogic and the fly likes Web application clustering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Web application clustering" Watch "Web application clustering" New topic
Author

Web application clustering

jonnabhatla venkata
Greenhorn

Joined: Feb 10, 2009
Posts: 24
Hi All,

I am using Weblogic 10.3 and configured clustering using weblogic 10.3
One adminserver with two managed servers.
I have deployed webapplication and used my web application after some time I shutdown the first
managed server here I observerd one thing that is session is not replicated here.
Is there any thing missed out in the configuration?
I have followed the follwing link in order to configure the clustering...
http://biemond.blogspot.com/2008/11/build-your-own-weblogic-103-cluster.html

after deploying webapplication I have given target as cluster (group of two managed servers)so it would deploy the webapplication
in all managed servers.Here My question is Is there any common Url to access the application or
it will maintain the different urls for two managed servers?

Please help me as soon as possible

Thanks in advance,
Krishna

Renjan Thomas
Ranch Hand

Joined: Jan 09, 2009
Posts: 49

To utilize in-memory replication(process of copying a session state from one server instance to another is called in-memory replication) for HTTP session states, you must access the WebLogic Server cluster using either a collection of Web servers with identically configured WebLogic proxy plug-ins, or load balancing hardware.

In-memory replication for HTTP session states is supported by the following Web server and proxy software:

WebLogic Server with the HttpClusterServlet
Sun One Web Server with the Netscape (proxy) plug-in
Apache with the Apache Server (proxy) plug-in
Microsoft Internet Information Server with the Microsoft-IIS (proxy) plug-in
jonnabhatla venkata
Greenhorn

Joined: Feb 10, 2009
Posts: 24
Renjan thomas wrote:
To utilize in-memory replication(process of copying a session state from one server instance to another is called in-memory replication) for HTTP session states, you must access the WebLogic Server cluster using either a collection of Web servers with identically configured WebLogic proxy plug-ins, or load balancing hardware.

In-memory replication for HTTP session states is supported by the following Web server and proxy software:

WebLogic Server with the HttpClusterServlet
Sun One Web Server with the Netscape (proxy) plug-in
Apache with the Apache Server (proxy) plug-in
Microsoft Internet Information Server with the Microsoft-IIS (proxy) plug-in




Hi Renjan thomas,

Thank you very much for your quick responce..

I have some doubts in the weblogic clustering.I have installed weblogic 10.3 and configured
Clustering environment by following the guidelines given in the below link..

http://biemond.blogspot.com/2008/11/build-your-own-weblogic-103-cluster.html

First I have created two managed servers with Url's 172.16.1.46:7101 (1st managed server)
172.16.1.131:7101(2nd managed server)
Aftre this I have created two machines after this I have created cluster
Cluster name is "mycluster" and cluster address is "172.16.1.46:7101,172.16.1.131:7101"

After this I have created domain with the above configuration with two managed servers and One adminstration server.
After this I have deployed Sample webapplication through Admin console and selected mycluster as target.
First I am accessing my web application through the following Url
http://172.16.1.46:7101/HelloWorld/clusterDemo (working fine here)
when I accessed from the following url (I mean second managed server running on 172.16.1.131)
http://172.16.1.46:7101/HelloWorld/clusterDemo
It is running from the begining of the application My sesssion is not replicated in second managed server.

Is there any configuration I missed out?
Is there any machanism accessing these two managed servers with single url?(I mean not manually switching between 172.16.1.46 and 172.16.1.131)
I heard that load balancer is solves the above problem if so how can I configure the load balancer to the weblogic cluster?(I know the mod_jk load balancer but dont know how to configure this to weblogic server cluster).

Please guide me the right approach..

Thanks in advance,
Krishna



Renjan Thomas
Ranch Hand

Joined: Jan 09, 2009
Posts: 49
To explain you how the failover mechanism works with weblogic we need to take any one of the above methods which I mentioned.

Here lets take HttpClusterServlet . For this browse to directory location:

BEA_HOME/wlserver_10.0/samples/server/examples/src/examples/cluster/sessionrep/inmemrep/

Where BEA_HOME is the directory containing your WebLogic Server installation.

Once you are in that location you can see an html document called instructions,open it and you will find the detailed example demonstration of HTTP Session state replication.


jonnabhatla venkata
Greenhorn

Joined: Feb 10, 2009
Posts: 24
Renjan thomas wrote:To explain you how the failover mechanism works with weblogic we need to take any one of the above methods which I mentioned.

Here lets take HttpClusterServlet . For this browse to directory location:

BEA_HOME/wlserver_10.0/samples/server/examples/src/examples/cluster/sessionrep/inmemrep/

Where BEA_HOME is the directory containing your WebLogic Server installation.

Once you are in that location you can see an html document called instructions,open it and you will find the detailed example demonstration of HTTP Session state replication.




Hi Renjan thomas,

Thank you for your quick responce....

I deployed my application with weblogic.xml file but I got the following exception while deployment...

weblogic.management.DeploymentException: Deployer:149003Unable to access application source information in 'C:\Weblogic10.3\bea\user_projects\domains\Cluster_domain\servers\MHS_1\stage\HelloWorld\HelloWorld.war' for application 'HelloWorld'. The specific error is: Deployer:149158No application files exist at 'C:\Weblogic10.3\bea\user_projects\domains\Cluster_domain\servers\MHS_1\stage\HelloWorld\HelloWorld.war'..

My sample application is the following directory structure.


web.xml
------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "web-app_2_3.dtd" >
<web-app>
<distributable/>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>ClusterDemo</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/clusterDemo.jsp</url-pattern>
</servlet-mapping>
</web-app>

weblogic.xml

------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "wls810_weblogic810-web-jar.dtd" >
<weblogic-web-app>

<session-descriptor>
<session-param>
<param-name> PersistentStoreType </param-name>
<param-value> replicated </param-value>
</session-param>
</session-descriptor>

</weblogic-web-app>

I am using weblogic 10.3 server. If I am deploying without weblogic.xml the application deploying and running
fine but when I included weblogic.xml the application not deploying.

Please reply me ASAP.....

Thanks in advance,
Krishna


jonnabhatla venkata
Greenhorn

Joined: Feb 10, 2009
Posts: 24
jonnabhatla venkata wrote:
Renjan thomas wrote:To explain you how the failover mechanism works with weblogic we need to take any one of the above methods which I mentioned.

Here lets take HttpClusterServlet . For this browse to directory location:

BEA_HOME/wlserver_10.0/samples/server/examples/src/examples/cluster/sessionrep/inmemrep/

Where BEA_HOME is the directory containing your WebLogic Server installation.

Once you are in that location you can see an html document called instructions,open it and you will find the detailed example demonstration of HTTP Session state replication.




Hi Renjan thomas,

Thank you for your quick responce....

I deployed my application with weblogic.xml file but I got the following exception while deployment...

weblogic.management.DeploymentException: Deployer:149003Unable to access application source information in 'C:\Weblogic10.3\bea\user_projects\domains\Cluster_domain\servers\MHS_1\stage\HelloWorld\HelloWorld.war' for application 'HelloWorld'. The specific error is: Deployer:149158No application files exist at 'C:\Weblogic10.3\bea\user_projects\domains\Cluster_domain\servers\MHS_1\stage\HelloWorld\HelloWorld.war'..

My sample application is the following directory structure.


web.xml
------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE web-app PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&quot; &quot;web-app_2_3.dtd&quot; &gt;
&lt;web-app&gt;
&lt;distributable/&gt;
&lt;servlet&gt;
&lt;servlet-name&gt;HelloWorld&lt;/servlet-name&gt;
&lt;servlet-class&gt;ClusterDemo&lt;/servlet-class&gt;
&lt;/servlet&gt;
&lt;servlet-mapping&gt;
&lt;servlet-name&gt;HelloWorld&lt;/servlet-name&gt;
&lt;url-pattern&gt;/clusterDemo.jsp&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;
&lt;/web-app&gt;

weblogic.xml

------------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE weblogic-web-app PUBLIC &quot;-//BEA Systems, Inc.//DTD Web Application 8.1//EN&quot; &quot;wls810_weblogic810-web-jar.dtd&quot; &gt;
&lt;weblogic-web-app&gt;

&lt;session-descriptor&gt;
&lt;session-param&gt;
&lt;param-name&gt; PersistentStoreType &lt;/param-name&gt;
&lt;param-value&gt; replicated &lt;/param-value&gt;
&lt;/session-param&gt;
&lt;/session-descriptor&gt;

&lt;/weblogic-web-app&gt;

I am using weblogic 10.3 server. If I am deploying without weblogic.xml the application deploying and running
fine but when I included weblogic.xml the application not deploying.

Please reply me ASAP.....

Thanks in advance,
Krishna


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web application clustering