# US 7,610,305 B2 · Simultaneous global transaction and local transaction management in an application server

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 7,610,305 B2
- Document ID: US7610305B2
- Status: Granted
- Kind: B2
- Application number: 10/422,452
- Filed: 2003-04-24
- Published: 2004-10-28
- Granted: 2009-10-27
- Earliest claimed: 2003-04-24
- Assignees: Sun Microsystems, Inc.
- Inventors: Sankara R. Bhogi; Ajay Kumar; Bala Dutt; Venugopal Rao K; Srinivasan Kannan; Senthil K. Krishnan
- Web page: https://patentgrep.com/patent/US7610305B2

## CPC

- G06F 9/466: {Transaction processing}
- G06Q 20/102: {Bill distribution or payments}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR

## Abstract

A system and a method for simultaneously managing a local transaction and a global transaction in an application server. In one embodiment, a system may manage a first transaction, from a first application component, as a local transaction and also manage a second transaction, from a second application component, as a global transaction. In one embodiment, the first transaction and the second transaction may be managed from the same instance of the application server.

## Claims

### Claim 1

A system, comprising:
one or more processors;
memory coupled to the one or more processors and storing program instructions executable by the one or more processors to implement:
a single application server running a first application component and managing a first transaction from said first application component with a first data source as a local transaction;
the single application server running a second application component and managing a second transaction from the second application component with a second data source as a global transaction, wherein the second transaction was initially started as a global transaction; and
wherein a same application server instance of the single application server runs both the first application component and the second application component, and wherein the same application server instance of the single application server centrally manages both the local transaction and the global transaction concurrently, wherein the local transaction and the global transaction are independent of one another.

### Claim 2 (depends on 1)

The system as recited in claim 1, wherein the first application component and the second application component are components of a same application.

### Claim 3 (depends on 1)

The system as recited in claim 1, wherein the first transaction is managed by a local transaction manager on the application server, and the second transaction is managed by a global transaction manager on the application server.

### Claim 4 (depends on 3)

The system as recited in claim 3, wherein a common application interface to the local transaction manager and the global transaction manager is provided to an application component in the application server as the common application interface to both the local transaction manager and the global transaction manager.

### Claim 5 (depends on 1)

The system as recited in claim 1, wherein the global transaction is committed using a two-phase commit protocol to either commit or rollback changes made during each respective transaction to a plurality of data sources.

### Claim 6 (depends on 1)

The system as recited in claim 1, wherein the local transaction is committed using a one-phase commit protocol to either commit or rollback changes made during each respective transaction to a data source.

### Claim 7 (depends on 1)

The system as recited in claim 1, wherein the application server comprises a runtime logic configured to return a transaction manager type for the first transaction and the second transaction of global or local, and wherein the transaction manager type is specified at a module level for the application components of an application module in the application server.

### Claim 8 (depends on 7)

The system as recited in claim 7, wherein the application module comprises a Web Archive (WAR), Enterprise Java Bean (EJB), or Java Archive (JAR) file.

### Claim 9 (depends on 1)

The system as recited in claim 1, wherein the application server comprises a runtime logic configured to return a transaction manager type of global or local, and wherein the transaction manager type is specified separately at a component level for a plurality of application components in the application server.

### Claim 10 (depends on 9)

The system as recited in claim 9, wherein the plurality of application components are servlet or Enterprise Java Bean (EJB) components.

### Claim 11 (depends on 1)

The system as recited in claim 1, wherein the application server comprises a runtime logic configured to determine a transaction manager type for the first transaction and the second transaction according to the transaction manager type specified for an application component that initiates the transaction.

### Claim 12 (depends on 11)

The system as recited in claim 11, wherein the runtime logic returns the transaction manager type specified at a module level if a transaction manager type is specified at the module level.

### Claim 13 (depends on 12)

The system as recited in claim 12, wherein the runtime logic returns the transaction manager type specified at a component level if no transaction manger type is specified at the module level and the transaction manager type is specified at the component level.

### Claim 14 (depends on 13)

The system as recited in claim 13, wherein the runtime logic returns a default transaction manager type specified for the application server if the transaction manager type is not specified at either the module level or the component level.

### Claim 15 (depends on 11)

The system as recited in claim 11, wherein the transaction manager type is statically set for a plurality of application components in a deployment descriptor for each application component in the application server.

### Claim 16 (depends on 1)

The system as recited in claim 1, wherein the application server is configured to concurrently manage both local transactions and global transactions.

### Claim 17 (depends on 1)

The system as recited in claim 1, wherein a common application interface to a local transaction object and a global transaction object is provided to the application components in the application server as the common application interface for transactions in the application server.

### Claim 18

A computer-implemented method, comprising:
managing a first transaction, from a first application component on a single application server, with a first data source as a local transaction;
managing a second transaction, from a second application component on the single application server, with a second data source as a global transaction, wherein the second transaction was initially started as a global transaction; and
wherein a same application server instance of the single application server runs both the first application component and the second application component, and wherein the same application server instance of the single application server centrally manages both the local transaction and the global transaction concurrently, wherein the local transaction and the global transaction are independent of one another.

### Claim 19 (depends on 18)

The method as recited in claim 18, wherein the first application component and the second application component are components of a same application.

### Claim 20 (depends on 18)

The method as recited in claim 18, wherein the first transaction is managed by a local transaction manager on the application server, and the second transaction is managed by a global transaction manager on the application server.

### Claim 21 (depends on 20)

The method as recited in claim 20, further comprising: providing a common application interface to the local transaction manager and the global transaction manager.

### Claim 22 (depends on 18)

The method as recited in claim 18, wherein the global transaction is committed using a two-phase commit protocol to either commit or rollback changes made during each respective transaction to a plurality of data sources.

### Claim 23 (depends on 18)

The method as recited in claim 18, wherein the local transaction is committed using a one-phase commit protocol to either commit or rollback changes made during each respective transaction to a data source.

### Claim 24 (depends on 18)

The method as recited in claim 18, further comprising: returning a transaction manager type for the first transaction and the second transaction of global or local, and specifying the transaction manager type at a module level for the application components of an application module in the application server.

### Claim 25 (depends on 24)

The method as recited in claim 24, wherein the application module comprises a Web Archive (WAR), Enterprise Java Bean (EJB), or Java Archive (JAR) file.

### Claim 26 (depends on 18)

The method as recited in claim 18, further comprising: returning a transaction manager type of global or local, and specifying the transaction manager type separately at a component level for a plurality of application components in the application server.

### Claim 27 (depends on 26)

The method as recited in claim 26, wherein the plurality of application components are servlet or Enterprise Java Bean (EJB) components.

### Claim 28 (depends on 18)

The method as recited in claim 18, further comprising: determining a transaction manager type for the first transaction and the second transaction according to the transaction manager type specified for an application component that initiates the transaction.

### Claim 29 (depends on 28)

The method as recited in claim 28, further comprising: returning the transaction manager type specified at a module level if a transaction manager type is specified at the module level.

### Claim 30 (depends on 29)

The method as recited in claim 29, further comprising: returning the transaction manager type specified at a component level if no transaction manger type is specified at the module level and the transaction manager type is specified at the component level.

### Claim 31 (depends on 30)

The method as recited in claim 30, further comprising: returning a default transaction manager type specified for the application server if the transaction manager type is not specified at either the module level or the component level.

### Claim 32 (depends on 28)

The method as recited in claim 28, further comprising: statically setting the transaction manager type for a plurality of application components in a deployment descriptor for each application component in the application server.

### Claim 33 (depends on 18)

The method as recited in claim 18, further comprising: concurrently managing both local transactions and global transactions in the application server.

### Claim 34 (depends on 18)

The method as recited in claim 18, further comprising: providing a common application interface to a local transaction object and a global transaction object as the common application interface for transactions in the application server.

### Claim 35

A storage medium storing program instructions, wherein the program instructions are computer-executable to:
manage a first transaction, from a first application component on a single application server, with a first data source as a local transaction;
manage a second transaction, from a second application component on the single application server, with a second data source as a global transaction, wherein the second transaction was initially started as a global transaction; and
wherein a same application server instance of the single application server runs both the first application component and the second application component, and wherein the same application server instance of the single application server centrally manages both the local transaction and the global transaction concurrently, wherein the local transaction and the global transaction are independent of one another.

### Claim 36 (depends on 35)

The storage medium as recited in claim 35, wherein the first application component and the second application component are components of a same application.

### Claim 37 (depends on 35)

The storage medium as recited in claim 35, wherein the first transaction is managed by a local transaction manager on the application server, and the second transaction is managed by a global transaction manager on the application server.

### Claim 38 (depends on 37)

The storage medium as recited in claim 37, wherein the program instructions are further executable to: providing a common application interface to the local transaction manager and the global transaction manager.

### Claim 39 (depends on 35)

The storage medium as recited in claim 35, wherein the global transaction is committed using a two-phase commit protocol to either commit or rollback changes made during each respective transaction to a plurality of data sources.

### Claim 40 (depends on 35)

The storage medium as recited in claim 35, wherein the local transaction is committed using a one-phase commit protocol to either commit or rollback changes made during each respective transaction to a data source.

### Claim 41 (depends on 35)

The storage medium as recited in claim 35, wherein the program instructions are further executable to: return a transaction manager type for the first transaction and the second transaction of global or local, and specify the transaction manager type at a module level for the application components of an application module in the application server.

### Claim 42 (depends on 41)

The storage medium as recited in claim 41, wherein the application module comprises a Web Archive (WAR), Enterprise Java Bean (EJB), or Java Archive (JAR) file.

### Claim 43 (depends on 35)

The storage medium as recited in claim 35, wherein the program instructions are further executable to: return a transaction manager type of global or local, and specify the transaction manager type separately at a component level for a plurality of application components in the application server.

### Claim 44 (depends on 43)

The storage medium as recited in claim 43, wherein the plurality of application components are servlet or Enterprise Java Bean (EJB) components.

### Claim 45 (depends on 35)

The storage medium as recited in claim 35, wherein the program instructions are further executable to: determine a transaction manager type for the first transaction and the second transaction according to the transaction manager type specified for an application component that initiates the transaction.

### Claim 46 (depends on 45)

The storage medium as recited in claim 45, wherein the program instructions are further executable to: return the transaction manager type specified at a module level if a transaction manager type is specified at the module level.

### Claim 47 (depends on 46)

The storage medium as recited in claim 46, wherein the program instructions are further executable to: return the transaction manager type specified at a component level if no transaction manger type is specified at the module level and the transaction manager type is specified at the component level.

### Claim 48 (depends on 47)

The storage medium as recited in claim 47, wherein the program instructions are further executable to: return a default transaction manager type specified for the application server if the transaction manager type is not specified at either the module level or the component level.

### Claim 49 (depends on 45)

The storage medium as recited in claim 45, wherein the program instructions are further executable to: statically set the transaction manager type for a plurality of application components in a deployment descriptor for each application component in the application server.

### Claim 50 (depends on 35)

The storage medium as recited in claim 35, wherein the program instructions are further executable to: concurrently manage both local transactions and global transactions in the application server.

### Claim 51 (depends on 35)

The storage medium as recited in claim 35, wherein the program instructions are further executable to: provide a common application interface to a local transaction object and a global transaction object as the common application interface for transactions in the application server.
