Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-97

JCA - Connection Management



    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • core
    • None


      This is the final proposal for the Connection Management section of the JCA specifications. It is a "clean" version of GERONIMO-90 + a minimalist deployer which allows to test such an implementation within a running server.

      When I write "clean", it is evident that some works still need to be done, however based on the size of the code-base - 30 classes - it should be great to reflect seriously on this proposal.

      The content by package is:

      The ConnectionManager spi interface has been implemented and delegates the allocation of connection handles to a pool of ManagedConnection. By now, the ConnectionManager is really simple: it delegates directly to the pool. However, one needs to hook-in the Transaction and Security services in the allocateConnection method.

      The specifications do not define how connection pooling should be implemented. However, some non-prescriptive guidelines have been provided. One of them is to partition this pool. This is basically what I have decided to implement: The pool is partition on a per-ManagedConnectionFactory basis. By now, it is further partitioned on an idle, active, factory, destroy basis. The general idea of this design is to define distinct set of behaviors depending on the kind of partition.

      The factory partition is in charge of creating/allocating new connection handles. When its allocateConnection method is called, it decides if a new ManagedConnection should be created or if an existing one can be re-used.
      The XA partition (to be implemented) is in charge of creating/allocating new transacted connection handles. When its allocateConnection is called, it enlists the ManagedConnection with our TM and then gets a connection handle from this enlisted ManagedConnection.

      Inter-partition events can be propagated via an AWT like event model. This mechanism is used for example by the factory partition: It monitors the idle and destroy partitions in order to decide how to serve a new allocation request. More accurately, if a ManagedConnection is added to the idle partition, then a permit to try a matchManagedConnection is added. If a ManagedConnection is added to the destroy partition, then a permit to create a new ManagedConnection is added.

      Partitions may be recycled. For instance, if a ManagedConnection seats idle too long time, then this ManagedConnection may be eligible for recycling (destroy in the case of idle ManagedConnection).

      The inner workings of ManagedConnectionFactory and ManagedConnection can be tracked via a PrintWriter. LoggerFactory defines the contract to obtain a PrintWriter factory backed by various output streams.

      A minimalist deployer for the outbound-resourceadapter nodes is implemented.





            djencks David Jencks
            gianny Gianny Damour
            0 Vote for this issue
            0 Start watching this issue