System and method for providing session affinity in a clustered database environment
First Claim
1. A system for supporting affinity in a data source and clustered database environment, comprising:
- a computer, including a computer readable medium and one or more microprocessors;
a clustered database system, and a notification service associated with a plurality of database instances in the clustered database system, wherein the notification service broadcasts notifications that describe state changes in the clustered database;
an application server environment on the computer, including one or more application server instances therein, wherein each said application server instance is associated with one or more data sources and one or more connection pools, wherein each said data source is associated with one or more affinity policies, each said affinity policy defining one of a session affinity and a distributed transaction (XA) affinity for that data source, wherein the data sources and connection pools are used to manage connections to the plurality of database instances in the clustered database based on the state changes in the clustered database;
wherein the session affinity is set as a default affinity policy for each said data source, and wherein the session affinity switches to the XA affinity when the each said data source is accessed outside a context of a session;
wherein when the session affinity is triggered for the each said data source, database operations requested by an application during a session are routed to a same said database instance;
wherein the routing to the same said database instance is performed bystoring routing information to an affinity context, andassociating the affinity context with the session using a work context object of the application,wherein the work context object propagates around the system and is accessible to each of the application requests for the database operations.
1 Assignment
0 Petitions
Accused Products
Abstract
A clustered database environment (e.g. Oracle Real Application Cluster (RAC)) includes multiple database instances that appear as one server. An application server (e.g. WebLogic Server (WLS)) can use a data source (e.g. an Oracle GridLink data source) and connection pools to connect with the clustered database. In accordance with an embodiment, a data source configuration allows for specification of a preferred affinity policy, such as a data affinity, temporal affinity, and/or session or session-based affinity policy. In accordance with an embodiment, the system includes a number of features that improve application connectivity in the clustered database environment, including a select-only case for application continuity, wherein an application-independent infrastructure, e.g. implemented within a Java Database Connectivity (JDBC) driver, enables recovery of work from an application perspective and masks system communications, hardware failures and hangs.
-
Citations
20 Claims
-
1. A system for supporting affinity in a data source and clustered database environment, comprising:
-
a computer, including a computer readable medium and one or more microprocessors; a clustered database system, and a notification service associated with a plurality of database instances in the clustered database system, wherein the notification service broadcasts notifications that describe state changes in the clustered database; an application server environment on the computer, including one or more application server instances therein, wherein each said application server instance is associated with one or more data sources and one or more connection pools, wherein each said data source is associated with one or more affinity policies, each said affinity policy defining one of a session affinity and a distributed transaction (XA) affinity for that data source, wherein the data sources and connection pools are used to manage connections to the plurality of database instances in the clustered database based on the state changes in the clustered database; wherein the session affinity is set as a default affinity policy for each said data source, and wherein the session affinity switches to the XA affinity when the each said data source is accessed outside a context of a session; wherein when the session affinity is triggered for the each said data source, database operations requested by an application during a session are routed to a same said database instance; wherein the routing to the same said database instance is performed by storing routing information to an affinity context, and associating the affinity context with the session using a work context object of the application, wherein the work context object propagates around the system and is accessible to each of the application requests for the database operations. - View Dependent Claims (2, 3, 4, 13, 14, 15)
-
-
5. A method for supporting session affinity in a data source and clustered database environment, comprising the steps of:
-
providing access to a clustered database system, and a notification service associated with a plurality of database instances in the clustered database system, wherein the notification service broadcasts notifications that describe state changes in the clustered database; providing an application server environment, including one or more application server instances therein, wherein each said application server instance is associated with one or more data sources and one or more connection pools, wherein each said data source is associated with one or more affinity policies, each said affinity policy defining one of a session affinity and a distributed transaction (XA) affinity for that data source, wherein the data sources and connection pools are used to manage connections to the plurality of database instances in the clustered database based on the state changes in the clustered database; wherein the session affinity is set as a default affinity policy for each said data source, and wherein the session affinity switches to the XA affinity when the each said data source is accessed outside a context of a session; wherein when the session affinity is triggered for the each said data source, database operations requested by an application during a session are directed to a said same database instances; wherein the routing to the same said database instance is performed by storing routing information to an affinity context, and associating the affinity context with the session using a work context object of the application, wherein the work context object propagates around the system and is accessible to each of the application requests for the database operations. - View Dependent Claims (6, 7, 8, 16, 17, 18)
-
-
9. A non-transitory computer readable medium, including instructions stored thereon which when read and executed by one or more computers cause the one or more computers to perform the steps comprising:
-
providing access to a clustered database system, and a notification service associated with a plurality of database instances in the clustered database system, wherein the notification service broadcasts notifications that describe state changes in the clustered database; providing an application server environment, including one or more application server instances therein, wherein each said application server instance is associated with one or more data sources and one or more connection pools, wherein each said data source is associated with one or more affinity policies, each said affinity policy defining one of a session affinity and a distributed transaction (XA) affinity for that data source, wherein the data sources and connection pools are used to manage connections to the plurality of database instances in the clustered database based on the state changes in the clustered database; wherein the session affinity is set as a default affinity policy for each said data source, and wherein the session affinity switches to the XA affinity when the each said data source is accessed outside a context of a session; wherein when the session affinity is triggered for the each said data source, database operations requested by an application during a session are directed to a said same database instance; wherein the routing to the same said database instance is performed by storing routing information to an affinity context, and associating the affinity context with the session using a work context object of the application, wherein the work context object propagates around the system and is accessible to each of the application requests for the database operations. - View Dependent Claims (10, 11, 12, 19, 20)
-
Specification