Coherence Based WebLogic Server Session Management
Posted
by [email protected]
on Oracle Blogs
See other posts from Oracle Blogs
or by [email protected]
Published on Thu, 01 Apr 2010 05:03:58 +0000
Indexed on
2010/04/01
5:13 UTC
Read the original article
Hit count: 758
Specifications
Supported Configurations
- WebLogic Server 10.3.2( or 10.3.1 )
- Coherence 3.5.2/463
If you use other verion above, then please check the following matrix:
WebLogic Server 9.2 MP1 | Weblogic Server 10.3 | |
WebLogic Smart Update | Patch ID: AJQB | Patch ID: 6W2W |
Minimum Coherence Release Level/MetaLink Patch ID | 3.4.2 Patch 2-Patch ID:8429415 | 3.4.2 Patch6-Patch ID:11399293 |
Environment Variables
%COHERENCE_HOME%: coherence installation directory
%DOMAIN_HOME%: weblogic domain foler.
Instructions
We Will create to weblogic domains: domain_a, domain_b. To configure those domains with coherence-based session management . Then the changings of session variable value in one domain will propagate to another domain.
Main Steps
WebLogic Server
- create domain_a
The process is ignored - copy %COHERENCE_HOME%\lib\coherence.jar to %DOMAIN_HOME%\lib
- startup domain
- deploy %COHERENCE_HOME%\lib\coherence-web-spi.war as a Shared Library
- repeat step 1~4 at domain_b
Coherence
- duplicate %COHERENCE_HOME%\bin\cache-server.cmd at the same folder and rename it to web-cache-server.cmd
- modify web-cache-server.cmd
java -server -Xms512m -Xmx512m -cp %coherence_home%/lib/coherence.jar;%coherence_home%/lib/coherence-web-spi.war -Dtangosol.coherence.management.remote=true -Dtangosol.coherence.cacheconfig=WEB-INF/classes/session-cache-config.xml -Dtangosol.coherence.session.localstorage=true com.tangosol.net.DefaultCacheServer - startup web-cache-server.cmd
Testing
- develop a web app with OEPE or JDeveloper and implment functions: changing, viewing, listing session variables. ( or download sample codes here )
- modify weblogic.xml with following content:
<?xml version="1.0" encoding="UTF-8"?> <wls:weblogic-web-app xmlns:wls=http://xmlns.oracle.com/weblogic/weblogic-web-app
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd"> <wls:weblogic-version>10.3.2</wls:weblogic-version> <wls:context-root>CoherenceWeb</wls:context-root> <wls:library-ref> <wls:library-name>coherence-web-spi</wls:library-name> <wls:specification-version>1.0.0.0</wls:specification-version> <wls:exact-match>true</wls:exact-match> </wls:library-ref> </wls:weblogic-web-app>
- deploy the web app to domain_a and domain_b
- change session varaible vlaue at domain_a and check whethe if changed at domain_b
References
© Oracle Blogs or respective owner