J2EE connector architecture
First Claim
1. A computer implemented method comprising:
- providing a connection in a pool of connections to enable an application component to connect to an Enterprise Information System (EIS), wherein the application component executes on a web application server that complies with the J2EE Connector Architecture (JCA);
measuring, with a timer, a last time that the connection was active;
determining whether the connection has reached a maximum idle time, wherein the maximum idle time is configured in a maximum idle time parameter;
if a value measured by the timer has reached the maximum idle time, considering the connection an expired connection;
receiving a connection request from an application component deployed on the web application server for a new connection;
determining that there are no free connections in the pool of connections and that the pool of connections has reached a maximum capacity;
subsequent to receiving the request for the new connection and determining that there are no free connections and that the pool has reached the maximum capacity, recycling the expired connection to free the expired connection;
assigning the connection that was freed to the application component that requested the new connection;
terminating the application component that was associated with the connection, wherein the connection is de-referenced and a finalize method associated with the connection is called;
if the application component does not close the connection, determining whether another entity has a reference to the connection;
if the application server determines that no other entities have references to the connection, closing the connection and designating the connection as a leaked connection; and
profiling the leaked connection by rendering a call stack, wherein the call stack of the leaked connection provides information for determining which application failed to close the connection, wherein a connection profiling enabled element located in an XML formatted descriptor file indicates whether the pool of connections stores call stacks of where each connection is allocated.
2 Assignments
0 Petitions
Accused Products
Abstract
A connector architecture implementation that is J2EE compliant and provides improved connection management capabilities. The connector architecture implementation provides a connector leak detection mechanism that detects connection leaks both automatically and manually. The connector architecture implementation pre-configures and manages the growth and reduction of a connection pool. The connector architecture implementation may be pre-configured by pre-populating the connection pool. Connection pool growth may be managed by generating connections in response to connection requests. A connection pool may also be configured to reduce the number of connections in the pool. The number of connections may be reduced if the connection demand decreases. Password credentials allowing access to services are used to provide additional connection management.
119 Citations
17 Claims
-
1. A computer implemented method comprising:
-
providing a connection in a pool of connections to enable an application component to connect to an Enterprise Information System (EIS), wherein the application component executes on a web application server that complies with the J2EE Connector Architecture (JCA); measuring, with a timer, a last time that the connection was active; determining whether the connection has reached a maximum idle time, wherein the maximum idle time is configured in a maximum idle time parameter; if a value measured by the timer has reached the maximum idle time, considering the connection an expired connection; receiving a connection request from an application component deployed on the web application server for a new connection; determining that there are no free connections in the pool of connections and that the pool of connections has reached a maximum capacity; subsequent to receiving the request for the new connection and determining that there are no free connections and that the pool has reached the maximum capacity, recycling the expired connection to free the expired connection; assigning the connection that was freed to the application component that requested the new connection; terminating the application component that was associated with the connection, wherein the connection is de-referenced and a finalize method associated with the connection is called; if the application component does not close the connection, determining whether another entity has a reference to the connection; if the application server determines that no other entities have references to the connection, closing the connection and designating the connection as a leaked connection; and profiling the leaked connection by rendering a call stack, wherein the call stack of the leaked connection provides information for determining which application failed to close the connection, wherein a connection profiling enabled element located in an XML formatted descriptor file indicates whether the pool of connections stores call stacks of where each connection is allocated. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer-implemented system for detecting connection leaks, comprising:
-
a processor; an application server that complies with the J2EE Connector Architecture (JCA); an application component, executable by the processor; a resource adapter to enable communication from the application server to an enterprise information server (EIS); a pool of connections, managed by the application server, to enable the application component to connect to the EIS; a garbage collector to recycle connection leaks, wherein after the application component terminates and a connection associated with the application component becomes de-referenced, the garbage collector calls a finalize method associated with the connection, wherein after the garbage collector calls the finalize method, if the application component has not closed the connection, determining whether another entity has a reference to the connection, and if the application server determines that no other entities have references to the connection, closing the connection and designating the connection as a leaked connection; a call stack that profiles the leaked connection, wherein the call stack of the leaked connection provides information for determining which application failed to close the connection, wherein a connection profiling enabled element located in an XML formatted descriptor file indicates whether the pool of connections stores call stacks of where each connection is allocated; and an idle timer that allows the application server to measure a last time each connection was active, wherein if a value measured by the timer has reached the maximum idle time, considering the connection an expired connection, if an application component makes a request for a new connection, and it is determined that there are no available allocated connections and the pool of connections is at maximum size, the application server frees the expired connection and assigns the connection that was freed to the application component. - View Dependent Claims (9, 10, 11)
-
-
12. A computer-readable storage medium, including instructions stored thereon which when read and executed by a computer cause the computer to perform steps comprising:
-
measuring, with a timer, a last time that a connection was active; determining whether the connection has reached a maximum idle time, wherein the maximum idle time is configured in a maximum idle time parameter; if a value measured by the timer has reached the maximum idle time, considering the connection an expired connection; receiving a request, from an application component, for a new connection; determining that there are no free connections in a pool of connections and that the pool of connections has reached a maximum capacity; subsequent to receiving the request for the connection and determining that there are no free connections and that the pool has reached the maximum capacity, recycling the expired connection to free the connection; assigning the connection that was freed to the application component that requested the new connection; terminating the application component that was associated with the connection, wherein the connection is de-referenced and a finalize method associated with the connection is called; if the application component does not close the connection, determining whether another entity has a reference to the connection; if the application server determines that no other entities have references to the connection, closing the connection and designating the connection as a leaked connection; and profiling the leaked connection by rendering a call stack, wherein the call stack of the leaked connection provides information for determining which application failed to close the connection, wherein a connection profiling enabled element located in an XML formatted descriptor file indicates whether the pool of connections stores call stacks of where each connection is allocated. - View Dependent Claims (13, 14, 15, 16, 17)
-
Specification