SlideShare a Scribd company logo
‹ #›
In memory session replication with WebLogic, GlassFish and Coherence Presenter Title
Agenda ActiveCache  - Coherence*Web Deployment Models Session Models Locking Modes Cluster Node Isolation Session and Session Attribute Sharing ActiveCache  - WebLogic Server 10.3  ActiveCache  - Oracle GlassFish Server 3.1
Coherence*Web
Coherence*Web What:  Distributed HTTP Session Management Span Applications:  Seamlessly share sessions between applications Span Heterogeneous Environments:  Share sessions between WebLogic, OAS, WebSphere, JBoss Handle Large Sessions:  Store more information within the session
Coherence*Web Why: Decouple session management  from web container  Handle more users  without adding more application servers  Restart/maintain  applications/containers without loosing sessions Handle very large sessions  efficiently  Keep session data coherent  under heavy load
Deployment Models
Deployment Models: In-Process Session state maintained within app server process Default model for ease of demonstration DO NOT USE IN PRODUCTION
Deployment Models: Out-of-Process Two tiers – app server and cache server Session data storage is offloaded from the app server tier  Each tier can be scaled independently Default recommendation due to flexibility
Deployment Models: Out-of-Process-Extend Similar to the Out-of-Process deployment model Communication between tiers is over Coherence*Extend (i.e. TCP/IP) Ideal in environments where network does not support UDP
Session Models
Session Models:  Traditional Manages each session in a single Coherence cache entry… …  But manages each session attribute’s serialization/deserialization separately
Session Models:  Monolithic Similar to the Traditional Model… …  But serializes and deserializes all session attributes together in a single object stream. Solves the shared object issue
Session Models: Split Session meta-data and “small” attributes stored in one cache “ Large” attributes stored in a separate cache Easily supports very large session objects Leverages near caching for “small” attributes HIGHLY RECOMMENDED
Locking Modes
Locking Mode Optimistic Locking (default) Allows multiple nodes  in a cluster to access an HTTP session simultaneously.  Concurrent updates are detected and rejected using an optimistic approach. Member Locking Does not allow more than one node  in the cluster to access an HTTP session.  Thread Locking Does not allow more than one thread  in the cluster to access an HTTP session.
Cluster Node Isolation
Cluster Node Isolation: App Server Scoped All deployed applications in each app server instance will be part of one Coherence node. Will result in the smallest number of Coherence nodes (one per web container JVM). Minimizes resource utilization (only one copy of the Coherence classes loaded per JVM)
Cluster Node Isolation: EAR Scoped All deployed applications within each EAR will be part of one Coherence node. Will result in the next smallest number of Coherence nodes (one per deployed EAR that uses Coherence*Web). Reduces the deployment effort as no changes to the application server classpath are required.
Cluster Node Isolation: WAR Scoped Each deployed web applications will be its own Coherence node. Will result in the largest number of Coherence nodes (one per deployed WAR that uses Coherence*Web). Results in the largest resource utilization out of the three options (one copy of the Coherence classes loaded per deployed WAR).
Session and Session Attribute Scoping
Session and Session Attribute Scoping Session Scoping Coherence*Web allows session data to be  shared by different Web applications  deployed in the same or different Web containers. Session Attribute Scoping Extension of Session Scoping  allowing for scoping of  individual session attributes  so that they are either globally visible or scoped to an individual web application.  Behavior is controllable via the  AttributeScopeController  interface. Two out of the box implementations:  ApplicationScopeController  and  GlobalScopeController
©2008 Oracle Corporation  ActiveCache and WebLogic
ActiveCache and WebLogic Integration of Coherence and WebLogic Server Incremental progress since launch of 11g The whole is greater than sum of its parts! Coherence*Web SPI Support for HTTP Sessions Dependency Injection Configuration, Lifecycle and and Monitoring of Coherence Clusters and Servers +
WebLogic Server Installers with Coherence PS2 installer includes Coherence 3.5.3p2 $MW_HOME\coherence_3.5 PS3 installer includes Coherence 3.6.0.4 $MW_HOME\coherence_3.6
active-cache-1.0.jar Shipped with WebLogic Server distribution Required for advanced WebLogic Server and Coherence integration Manage Coherence configuration with WLS MBeans and WLS Console Dependency Injection in JEE modules Manages Coherence Lifecycle in JEE modules How to reference from applications: EAR scope - Import into the JEE application as a shared library jar in weblogic-application.xml WAR scope - Import as an optional package via META-INF/manfiest.mf Server scope – reference this jar from the system classpath
active-cache-1.0.jar (continued) META-INF/manifest.mf file uses relative paths to refer to other WLS libraries, so refer to this jar in the location: $WLS_HOME/common/deployable-libraries  If you copy it out of that location it will not work Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.1 Created-By: R28.0.2-3-133398-1.6.0_20-20100512-1453-windows-ia32 (Orac le Corporation) Specification-Title: active-cache Specification-Version: 1.0 Implementation-Title: active-cache Implementation-Version: 1.0 Extension-Name: active-cache Class-Path: @BEA_HOME@/modules/features/weblogic.server.modules.cohere nce.integration_10.3.4.0.jar ../../../modules/features/weblogic.serve r.modules.coherence.integration_10.3.4.0.jar
coherence.jar Shipped with Coherence distribution in $COHERENCE_HOME/lib Contains core Coherence classes How to reference from applications: EAR scoped - reference as a shared library in weblogic-application.xml (recommended) or embed in APP-INF/lib WAR scoped - embed in an application in WEB-INF/lib Server scoped - can be put on the system classpath
coherence-web-spi.war Shipped with Coherence distribution in $COHERENCE_HOME/lib Contains WebLogic Server SPI implementation for HTTP Session storage in Coherence Reference as a shared library in web module WEB-INF/weblogic.xml Contains default cache configuration for session storage WEB-INF/classes/session-cache-config.xml (can be overridden via classpath) Local storage defaults to false by default
Node Manager and Coherence Servers Coherence Servers need classpath to include $MW_HOME/modules/features/weblogic.server.modules.coherence.server_10.3.4.0.jar META-INF/manfist.mf contains relative references to other WebLogic Server libraries, so refer to it in the default location and do not copy it If no classpath entries are specified in Startup tab, this jar and coherence.jar are added by default implicitly by Node Manager
©2008 Oracle Corporation  ActiveCache and GlassFish
ActiveCache and Oracle GlassFish Server Integration of Coherence and GlassFish For commercial distribution, not open source edition Coherence*Web support for HTTP Sessions +
Getting Started Configure your session to use Coherence*Web Edit glassfish-web.xml <glassfish-web-app error-url=“”> <Session-config> <session-manager persistence-type=“coherence-web” /> </session-config> … </glassfish-web-app> Advanced configuration options available in glassfish-web.xml Defaults will handle most web applications Additional <context-params> elements will override or add new configuration
Preparing your GlassFish application(s) Configuration changes do require restart of Web App Extract coherence-web.jar and session-cache-config.xml from coherence\lib\webInstaller.jar/web-install Copy session-cache-config.xml to WEB-INF\classes If clustered, copy coherence.jar to appropriate location
Example: preparing your GlassFish Server Example: clustered, in-process deployment model Create/configure domain Use asadmin at command line to create and start Use GF console to add appropriate JVM options  coherence –D JVM arguments Example JVM options Well known addresses (as opposed to multicast) If multi-homed system that has multiple IPs, which IP to bind to Tell glassfish to use cache servers for storage, not the in the GlassFish JVM, e.g. Session.localstorage=false (ensuring use of coherence cache server, not GF)
Example continued Example: clustered, in-process deployment model Configure load balancer (ex. Apache) Configure JVM for cluster or standalone servers to use Configure / Enable mod_jk.conf load balancer plug-in Mount paths defined in workers.properties Edit workers.properties list to accommodate cluster members Enable mod_jk for GlassFish – Djvmroute option for routing to LB JVM -D option for location of workers.properties & In GF console, enable JK network listener for Apache  for AJP protocol
Links Coherence User Guide http://coherence.oracle.com/display/COH35UG Coherence*Web Session Management http://coherence.oracle.com/display/COH35UG/Coherence*Web+Session+Management+Module Coherence*Web and WebLogic Server http://coherence.oracle.com/display/COH35UG/Coherence*Web+and+WebLogic+Server Coherence*Web and WebLogic Portal http://coherence.oracle.com/display/COH35UG/Coherence*Web+and+WebLogic+Portal
 

More Related Content

What's hot (20)

PDF
Spring boot introduction
Rasheed Waraich
 
PDF
React and redux
Mystic Coders, LLC
 
PPT
Hibernate architecture
Anurag
 
PPTX
Dependency injection using Google guice
Aman Verma
 
PPT
Java J2EE
Sandeep Rawat
 
PDF
Spring Boot
Jaran Flaath
 
PPTX
FS_module_functions.pptx
Bareen Shaikh
 
PPTX
Session bean
sandeep54552
 
PPTX
Application server vs Web Server
Gagandeep Singh
 
PDF
Java 8-streams-collectors-patterns
José Paumard
 
PPTX
IO State In Distributed API Architecture
Owen Rubel
 
PPTX
Spring boot Introduction
Jeevesh Pandey
 
PPTX
Spring Boot
Jiayun Zhou
 
PPTX
Express js
Manav Prasad
 
PDF
Introduction to Jasper Reports
Mindfire Solutions
 
PDF
Microservices with Java, Spring Boot and Spring Cloud
Eberhard Wolff
 
PDF
Documenting your REST API with Swagger - JOIN 2014
JWORKS powered by Ordina
 
PPTX
Soap vs rest
Antonio Severien
 
PPT
Java Servlets
BG Java EE Course
 
PPTX
Building a REST Service in minutes with Spring Boot
Omri Spector
 
Spring boot introduction
Rasheed Waraich
 
React and redux
Mystic Coders, LLC
 
Hibernate architecture
Anurag
 
Dependency injection using Google guice
Aman Verma
 
Java J2EE
Sandeep Rawat
 
Spring Boot
Jaran Flaath
 
FS_module_functions.pptx
Bareen Shaikh
 
Session bean
sandeep54552
 
Application server vs Web Server
Gagandeep Singh
 
Java 8-streams-collectors-patterns
José Paumard
 
IO State In Distributed API Architecture
Owen Rubel
 
Spring boot Introduction
Jeevesh Pandey
 
Spring Boot
Jiayun Zhou
 
Express js
Manav Prasad
 
Introduction to Jasper Reports
Mindfire Solutions
 
Microservices with Java, Spring Boot and Spring Cloud
Eberhard Wolff
 
Documenting your REST API with Swagger - JOIN 2014
JWORKS powered by Ordina
 
Soap vs rest
Antonio Severien
 
Java Servlets
BG Java EE Course
 
Building a REST Service in minutes with Spring Boot
Omri Spector
 

Viewers also liked (20)

PPTX
Internet access via cable tv network ppt
Upender Upr
 
PDF
Innovations in Grid Computing with Oracle Coherence
Bob Rhubart
 
PPTX
Http overview
ısmayıl Tahmazov
 
PDF
The Scrum Canvas
Sebastian Schneider
 
PDF
Access Control for HTTP Operations on Linked Data
Luca Costabello
 
PPTX
WebLogic Server Work Managers and Overload Protection
James Bayer
 
PDF
Session hijacking
mamatnamaku
 
PDF
Igor Cernopolc - Http authentication in automated testing - presentation
Codecamp Romania
 
PPTX
Introduction to HTTP
Yihua Huang
 
PPTX
Web servers
Mostafa Alinaghi Pour
 
PDF
Web Servers - How They Work
Brian Gallagher
 
PPT
Presentation (PowerPoint File)
webhostingguy
 
PPT
5 introduction to internet
Vedpal Yadav
 
PDF
Servers & Web Hosting
Reza San
 
PPT
5-WebServers.ppt
webhostingguy
 
PPTX
Internet applications
Nur Azlina
 
PPT
Download It
webhostingguy
 
PPT
Semantic Web Servers
webhostingguy
 
PPT
Understanding
webhostingguy
 
PPTX
What Happens When You Own Google.com For A Minute?
Bhoomi Patel
 
Internet access via cable tv network ppt
Upender Upr
 
Innovations in Grid Computing with Oracle Coherence
Bob Rhubart
 
Http overview
ısmayıl Tahmazov
 
The Scrum Canvas
Sebastian Schneider
 
Access Control for HTTP Operations on Linked Data
Luca Costabello
 
WebLogic Server Work Managers and Overload Protection
James Bayer
 
Session hijacking
mamatnamaku
 
Igor Cernopolc - Http authentication in automated testing - presentation
Codecamp Romania
 
Introduction to HTTP
Yihua Huang
 
Web Servers - How They Work
Brian Gallagher
 
Presentation (PowerPoint File)
webhostingguy
 
5 introduction to internet
Vedpal Yadav
 
Servers & Web Hosting
Reza San
 
5-WebServers.ppt
webhostingguy
 
Internet applications
Nur Azlina
 
Download It
webhostingguy
 
Semantic Web Servers
webhostingguy
 
Understanding
webhostingguy
 
What Happens When You Own Google.com For A Minute?
Bhoomi Patel
 
Ad

Similar to HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic (19)

PPTX
Coherence sig-nfr-web-tier-scaling-using-coherence-web
C2B2 Consulting
 
PPTX
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
jeckels
 
PPTX
Oracle Coherence
Liran Zelkha
 
PPTX
Coherence Overview - OFM Canberra July 2014
Joelith
 
ODT
Healthcheck 07 application
Nakedi Kobo
 
PPTX
AMIS OOW Review 2012 - Deel 5 Coherence - Paco van der Linden
Getting value from IoT, Integration and Data Analytics
 
PDF
Riena onrap econ-2011
christiancampo
 
PDF
Was liberty at scale
sflynn073
 
PPTX
Coherence RoadMap 2018
harvraja
 
PDF
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
C2B2 Consulting
 
PPT
BUG - BEA Users\' Group, Jan16 2003
Sanjeev Kumar
 
PDF
Oracle Service Bus & Coherence Caching Strategies
William Markito Oliveira
 
PDF
Xebia Knowledge Exchange (feb 2011) - Large Scale Web Development
Michaël Figuière
 
PDF
Cassandra Day SV 2014: Infinite Session Clustering with Apache Cassandra
DataStax Academy
 
PPT
10 conversations new
thirumuru2012
 
PDF
Coherence 12.1.2 Hidden Gems
harvraja
 
PPT
WebLogic 12c - OMF Canberra June 2014
Joelith
 
PDF
What We Wish We Had Known: Becoming an IBM Connections Administrator
Gabriella Davis
 
PPT
ibm websphere admin training | websphere admin course | ibm websphere adminis...
Nancy Thomas
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
C2B2 Consulting
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
jeckels
 
Oracle Coherence
Liran Zelkha
 
Coherence Overview - OFM Canberra July 2014
Joelith
 
Healthcheck 07 application
Nakedi Kobo
 
AMIS OOW Review 2012 - Deel 5 Coherence - Paco van der Linden
Getting value from IoT, Integration and Data Analytics
 
Riena onrap econ-2011
christiancampo
 
Was liberty at scale
sflynn073
 
Coherence RoadMap 2018
harvraja
 
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
C2B2 Consulting
 
BUG - BEA Users\' Group, Jan16 2003
Sanjeev Kumar
 
Oracle Service Bus & Coherence Caching Strategies
William Markito Oliveira
 
Xebia Knowledge Exchange (feb 2011) - Large Scale Web Development
Michaël Figuière
 
Cassandra Day SV 2014: Infinite Session Clustering with Apache Cassandra
DataStax Academy
 
10 conversations new
thirumuru2012
 
Coherence 12.1.2 Hidden Gems
harvraja
 
WebLogic 12c - OMF Canberra June 2014
Joelith
 
What We Wish We Had Known: Becoming an IBM Connections Administrator
Gabriella Davis
 
ibm websphere admin training | websphere admin course | ibm websphere adminis...
Nancy Thomas
 
Ad

Recently uploaded (20)

PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
NASA A Researcher’s Guide to International Space Station : Earth Observations
Dr. PANKAJ DHUSSA
 
PPTX
Role_of_Artificial_Intelligence_in_Livestock_Extension_Services.pptx
DrRajdeepMadavi
 
PDF
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
Survival Models: Proper Scoring Rule and Stochastic Optimization with Competi...
Paris Women in Machine Learning and Data Science
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
“ONNX and Python to C++: State-of-the-art Graph Compilation,” a Presentation ...
Edge AI and Vision Alliance
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Linux schedulers for fun and profit with SchedKit
Alessio Biancalana
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
Essential Content-centric Plugins for your Website
Laura Byrne
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
NASA A Researcher’s Guide to International Space Station : Earth Observations
Dr. PANKAJ DHUSSA
 
Role_of_Artificial_Intelligence_in_Livestock_Extension_Services.pptx
DrRajdeepMadavi
 
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Survival Models: Proper Scoring Rule and Stochastic Optimization with Competi...
Paris Women in Machine Learning and Data Science
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
“ONNX and Python to C++: State-of-the-art Graph Compilation,” a Presentation ...
Edge AI and Vision Alliance
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Linux schedulers for fun and profit with SchedKit
Alessio Biancalana
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Essential Content-centric Plugins for your Website
Laura Byrne
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 

HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic

  • 2. In memory session replication with WebLogic, GlassFish and Coherence Presenter Title
  • 3. Agenda ActiveCache - Coherence*Web Deployment Models Session Models Locking Modes Cluster Node Isolation Session and Session Attribute Sharing ActiveCache - WebLogic Server 10.3 ActiveCache - Oracle GlassFish Server 3.1
  • 5. Coherence*Web What: Distributed HTTP Session Management Span Applications: Seamlessly share sessions between applications Span Heterogeneous Environments: Share sessions between WebLogic, OAS, WebSphere, JBoss Handle Large Sessions: Store more information within the session
  • 6. Coherence*Web Why: Decouple session management from web container Handle more users without adding more application servers Restart/maintain applications/containers without loosing sessions Handle very large sessions efficiently Keep session data coherent under heavy load
  • 8. Deployment Models: In-Process Session state maintained within app server process Default model for ease of demonstration DO NOT USE IN PRODUCTION
  • 9. Deployment Models: Out-of-Process Two tiers – app server and cache server Session data storage is offloaded from the app server tier Each tier can be scaled independently Default recommendation due to flexibility
  • 10. Deployment Models: Out-of-Process-Extend Similar to the Out-of-Process deployment model Communication between tiers is over Coherence*Extend (i.e. TCP/IP) Ideal in environments where network does not support UDP
  • 12. Session Models: Traditional Manages each session in a single Coherence cache entry… … But manages each session attribute’s serialization/deserialization separately
  • 13. Session Models: Monolithic Similar to the Traditional Model… … But serializes and deserializes all session attributes together in a single object stream. Solves the shared object issue
  • 14. Session Models: Split Session meta-data and “small” attributes stored in one cache “ Large” attributes stored in a separate cache Easily supports very large session objects Leverages near caching for “small” attributes HIGHLY RECOMMENDED
  • 16. Locking Mode Optimistic Locking (default) Allows multiple nodes in a cluster to access an HTTP session simultaneously. Concurrent updates are detected and rejected using an optimistic approach. Member Locking Does not allow more than one node in the cluster to access an HTTP session. Thread Locking Does not allow more than one thread in the cluster to access an HTTP session.
  • 18. Cluster Node Isolation: App Server Scoped All deployed applications in each app server instance will be part of one Coherence node. Will result in the smallest number of Coherence nodes (one per web container JVM). Minimizes resource utilization (only one copy of the Coherence classes loaded per JVM)
  • 19. Cluster Node Isolation: EAR Scoped All deployed applications within each EAR will be part of one Coherence node. Will result in the next smallest number of Coherence nodes (one per deployed EAR that uses Coherence*Web). Reduces the deployment effort as no changes to the application server classpath are required.
  • 20. Cluster Node Isolation: WAR Scoped Each deployed web applications will be its own Coherence node. Will result in the largest number of Coherence nodes (one per deployed WAR that uses Coherence*Web). Results in the largest resource utilization out of the three options (one copy of the Coherence classes loaded per deployed WAR).
  • 21. Session and Session Attribute Scoping
  • 22. Session and Session Attribute Scoping Session Scoping Coherence*Web allows session data to be shared by different Web applications deployed in the same or different Web containers. Session Attribute Scoping Extension of Session Scoping allowing for scoping of individual session attributes so that they are either globally visible or scoped to an individual web application. Behavior is controllable via the AttributeScopeController interface. Two out of the box implementations: ApplicationScopeController and GlobalScopeController
  • 23. ©2008 Oracle Corporation ActiveCache and WebLogic
  • 24. ActiveCache and WebLogic Integration of Coherence and WebLogic Server Incremental progress since launch of 11g The whole is greater than sum of its parts! Coherence*Web SPI Support for HTTP Sessions Dependency Injection Configuration, Lifecycle and and Monitoring of Coherence Clusters and Servers +
  • 25. WebLogic Server Installers with Coherence PS2 installer includes Coherence 3.5.3p2 $MW_HOME\coherence_3.5 PS3 installer includes Coherence 3.6.0.4 $MW_HOME\coherence_3.6
  • 26. active-cache-1.0.jar Shipped with WebLogic Server distribution Required for advanced WebLogic Server and Coherence integration Manage Coherence configuration with WLS MBeans and WLS Console Dependency Injection in JEE modules Manages Coherence Lifecycle in JEE modules How to reference from applications: EAR scope - Import into the JEE application as a shared library jar in weblogic-application.xml WAR scope - Import as an optional package via META-INF/manfiest.mf Server scope – reference this jar from the system classpath
  • 27. active-cache-1.0.jar (continued) META-INF/manifest.mf file uses relative paths to refer to other WLS libraries, so refer to this jar in the location: $WLS_HOME/common/deployable-libraries If you copy it out of that location it will not work Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.1 Created-By: R28.0.2-3-133398-1.6.0_20-20100512-1453-windows-ia32 (Orac le Corporation) Specification-Title: active-cache Specification-Version: 1.0 Implementation-Title: active-cache Implementation-Version: 1.0 Extension-Name: active-cache Class-Path: @BEA_HOME@/modules/features/weblogic.server.modules.cohere nce.integration_10.3.4.0.jar ../../../modules/features/weblogic.serve r.modules.coherence.integration_10.3.4.0.jar
  • 28. coherence.jar Shipped with Coherence distribution in $COHERENCE_HOME/lib Contains core Coherence classes How to reference from applications: EAR scoped - reference as a shared library in weblogic-application.xml (recommended) or embed in APP-INF/lib WAR scoped - embed in an application in WEB-INF/lib Server scoped - can be put on the system classpath
  • 29. coherence-web-spi.war Shipped with Coherence distribution in $COHERENCE_HOME/lib Contains WebLogic Server SPI implementation for HTTP Session storage in Coherence Reference as a shared library in web module WEB-INF/weblogic.xml Contains default cache configuration for session storage WEB-INF/classes/session-cache-config.xml (can be overridden via classpath) Local storage defaults to false by default
  • 30. Node Manager and Coherence Servers Coherence Servers need classpath to include $MW_HOME/modules/features/weblogic.server.modules.coherence.server_10.3.4.0.jar META-INF/manfist.mf contains relative references to other WebLogic Server libraries, so refer to it in the default location and do not copy it If no classpath entries are specified in Startup tab, this jar and coherence.jar are added by default implicitly by Node Manager
  • 31. ©2008 Oracle Corporation ActiveCache and GlassFish
  • 32. ActiveCache and Oracle GlassFish Server Integration of Coherence and GlassFish For commercial distribution, not open source edition Coherence*Web support for HTTP Sessions +
  • 33. Getting Started Configure your session to use Coherence*Web Edit glassfish-web.xml <glassfish-web-app error-url=“”> <Session-config> <session-manager persistence-type=“coherence-web” /> </session-config> … </glassfish-web-app> Advanced configuration options available in glassfish-web.xml Defaults will handle most web applications Additional <context-params> elements will override or add new configuration
  • 34. Preparing your GlassFish application(s) Configuration changes do require restart of Web App Extract coherence-web.jar and session-cache-config.xml from coherence\lib\webInstaller.jar/web-install Copy session-cache-config.xml to WEB-INF\classes If clustered, copy coherence.jar to appropriate location
  • 35. Example: preparing your GlassFish Server Example: clustered, in-process deployment model Create/configure domain Use asadmin at command line to create and start Use GF console to add appropriate JVM options coherence –D JVM arguments Example JVM options Well known addresses (as opposed to multicast) If multi-homed system that has multiple IPs, which IP to bind to Tell glassfish to use cache servers for storage, not the in the GlassFish JVM, e.g. Session.localstorage=false (ensuring use of coherence cache server, not GF)
  • 36. Example continued Example: clustered, in-process deployment model Configure load balancer (ex. Apache) Configure JVM for cluster or standalone servers to use Configure / Enable mod_jk.conf load balancer plug-in Mount paths defined in workers.properties Edit workers.properties list to accommodate cluster members Enable mod_jk for GlassFish – Djvmroute option for routing to LB JVM -D option for location of workers.properties & In GF console, enable JK network listener for Apache for AJP protocol
  • 37. Links Coherence User Guide http://coherence.oracle.com/display/COH35UG Coherence*Web Session Management http://coherence.oracle.com/display/COH35UG/Coherence*Web+Session+Management+Module Coherence*Web and WebLogic Server http://coherence.oracle.com/display/COH35UG/Coherence*Web+and+WebLogic+Server Coherence*Web and WebLogic Portal http://coherence.oracle.com/display/COH35UG/Coherence*Web+and+WebLogic+Portal
  • 38.  

Editor's Notes

  • #3: (c) Copyright 2007. Oracle Corporation
  • #4: ActiveCache refers to the integration of Coherence with another server like WebLogic, or GlassFish. Coherence*Web is one of the main integration points, so we’ll cover that first.
  • #9: The IN-Process deployment model is mainly provided to allow for easy demostration, evaluation and smoke-testing. In this deployment model the only nodes in the cluster/grid are the application server JVMs and the session state is partitioned/maintained within the process space(s) of the application server. This is the default deployment model out of the box but should NOT be used in production. Default ONLY for ease of eval, demonstration and smoke-testing. DO NOT USE IN PRODUCTION!
  • #10: The Out-of-Process deployment model off loads the session state to a dedicated tier of JVMs that are only responsible for storing session state (i.e. cache servers). This approach is beneficial in that: 1. Session data storage is offloaded from the application server tier to the cache server tier – reducing heap usage, garbage collection times, etc. 2. It allows for the two tiers to be scaled independently of one another – If more application processing power is needed, just start more application servers. If more session storage capacity is needed, just start more cache servers. The Out-of-Process topology is our default recommendation due to its flexibility.
  • #11: The Out-of-Process with Coherence*Extend topology is similar to the Out-of-Process topology except that the communication between the application server tier and the cache server tier are over Coherence*Extend (i.e. TCP/IP). This approach has the same benefits as the Out-of-Process topology as well as the ability to segment deployment of application servers and cache servers. This is ideal in an environment where application servers are on a network that does not support UDP. The cache servers can be set up in a separate dedicated network, with the application servers connecting to the cluster via TCP.
  • #13: TraditionalHttpSessionModel and TraditionalHttpSessionCollectionmanages all of the HTTP session data for a particular session in a single Coherence cache entry, but manages each HTTP session attribute (particularly, its serialization and deserialization) separately. This model is suggested for applications with relatively small HTTP session objects (10KB or less) that do not have issues with object-sharing between session attributes. (Object-sharing between session attributes occurs when multiple attributes of a session have references to the same exact object, meaning that separate serialization and deserialization of those attributes will cause multiple instances of that shared object to exist when the HTTP session is later deserialized.)
  • #14: MonolithicHttpSessionModel and MonolithicHttpSessionCollection is similar to the Traditional Model, except that it solves the shared object issue by serializing and deserializing all attributes together in a single object stream. As a result, the Monolithic Model is often less performant than the Traditional Model.
  • #15: SplitHttpSessionModel and SplitHttpSessionCollection manages the core HTTP session data such as the session ID, creation time, last access time, etc. together with all of the small session attributes in the same manner as the Traditional Model, thus ensuring high performance by keeping that block of session data small. All large attributes are split out into separate cache entries to be managed individually, thus supporting very large HTTP session objects without unduly increasing the amount of data that needs to be accessed and updated within the cluster on each request. In other words, only the large attributes that are modified within a particular request will incur any network overhead for their updates, and (because it uses Near Caching) the Split Model generally does not incur any network overhead for accessing either the core HTTP session data or any of the session attributes. In conclusion: The Split Model is the recommended session model for most applications. The Traditional Model may be more optimal for applications that are known to have small HTTP session objects. The Monolithic Model is designed to solve a specific class of problems related to multiple session attributes that have references to the same shared object, and that must maintain that object as a shared object. NOTE: that when using the Split Session Model in combination with the Out-of-Process deployment model only the “session storage cache” is near cached in the app server process space. The “session overflow cache” – which holds the “large” session attributes does NOT have a near cache in front of it.
  • #17: Lock Free: This setting does not use explicit locking; rather an optimistic approach is used to detect and prevent concurrent updates upon completion of an HTTP request that modifies the session. When Coherence*Web detects a concurrent modification, a ConcurrentModificationException is thrown to the application; therefore an application must be prepared to handle this exception in an appropriate manner. Member Locking: This is accomplished by acquiring a member-level lock for an HTTP session at the beginning of a request and releasing the lock upon completion of the request. Thread Locking: This is accomplished by acquiring both a member-level and thread-level lock for an HTTP session at the beginning of a request and releasing both locks upon completion of the request.
  • #19: With this configuration, all deployed applications in a container using Coherence*Web will be part of one Coherence node. This configuration will produce the smallest number of Coherence nodes in the cluster (one per web container JVM) and since the Coherence library (coherence.jar) is deployed in the container&apos;s classpath, only one copy of the Coherence classes will be loaded into the JVM, thus minimizing resource utilization. On the other hand, since all applications are using the same cluster node, all applications will be affected if one application misbehaves. Requirements for using this configuration are: * Each deployed application must use the same version of Coherence and participate in the same cluster. * Objects placed in the HTTP session must have their classes in the container&apos;s classpath.
  • #20: only one copy of the Coherence classes will be loaded per EAR. Since all web applications in the EAR use the same Cluster node, all web applications in the EAR will be affected if one of the web applications misbehaves. EAR scoped cluster nodes reduce the deployment effort as no changes to the application server classpath are required. This option is also ideal if you plan on deploying only one EAR to an application server. Requirements for using this configuration are: * The Coherence library (coherence.jar) must be deployed as part of the EAR file and listed as a Java module in META-INF/application.xml. * Objects placed into the HTTP session will need to have their classes deployed as a Java EAR module in a similar fashion.
  • #21: However, since each deployed web application is its own cluster node, web applications are completely isolated from other potentially misbehaving web applications. WAR scoped cluster nodes reduce the deployment effort as no changes to the application server classpath are required. This option is also ideal if you plan on deploying only one wAR to an application server. Requirements for using this configuration are: * The Coherence library (coherence.jar) must be deployed as part of the WAR file (usually in WEB-INF/lib). * Objects placed into the HTTP session will need to have their classes deployed as part of the WAR file (in WEB-INF/lib or WEB-INF/classes).
  • #25: How would the features beyond Coherence*Web be used? In addition to leveraging Coherence to store WebLogic Server HTTP Sessions: TopLink Grid – caching for JPA and write-behind Manage a large Coherence cluster with WebLogic Server infrastructure (AdminServer, Node Manager) WebLogic Suite applications leveraging both WebLogic Server and Coherence
  • #33: This is the starting point, but as you can see from the WebLogic ActiveCache being about more than just Coherence*Web, there are many more possibilities in the future.
  • #34: Starting with Coherence 3.7 and Oracle GlassFish Server 3.1, there is a new feature of Coherence*Web called ActiveCache for GlassFish. ActiveCache for GlassFish provides Coherence*Web functionality in Web applications deployed on Oracle GlassFish Servers. In previous releases, the Coherence*Web WebInstaller was required to pre-process applications before they could use Coherence*Web for session storage. With ActiveCache for GlassFish, the WebInstaller pre-processing step is not required for GlassFish 3.1 applications.
  • #35: On the GlassFish Server, Coherence*Web can be configured only for EAR- or WAR-scoped cluster nodes. Because of the way that GlassFish Server class loaders work, it is not possible to configure application server-scoped cluster nodes. Clustered WAR packaging means that each deployed WAR file will create a Coherence node in the cluster. If you package multiple WAR files in an EAR file, then each WAR file will create a Coherence node in the cluster.
  • #36: May need set distributed.localstorage for any application specific caches as well.
  • #37: Again, this assumes an in-process deployment model for a cluster of glassfish servers.