JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Application Development Guide
search filter icon
search icon

Document Information

Preface

Part I Development Tasks and Tools

1.  Setting Up a Development Environment

2.  Class Loaders

3.  Debugging Applications

Part II Developing Applications and Application Components

4.  Securing Applications

5.  Developing Web Services

6.  Using the Java Persistence API

7.  Developing Web Applications

8.  Using Enterprise JavaBeans Technology

9.  Using Container-Managed Persistence

10.  Developing Java Clients

11.  Developing Connectors

12.  Developing Lifecycle Listeners

13.  Developing OSGi-enabled Java EE Applications

Part III Using Services and APIs

14.  Using the JDBC API for Database Access

Statements

Using an Initialization Statement

Setting a Statement Timeout

Statement Leak Detection and Leaked Statement Reclamation

Statement Caching

Statement Tracing

Connections

Transparent Pool Reconfiguration

Disabling Pooling

Associating Connections with Threads

Custom Connection Validation

Sharing Connections

Marking Bad Connections

Handling Invalid Connections

Connection Wrapping

Wrapping Connections

Obtaining a Physical Connection From a Wrapped Connection

Using the Connection.unwrap() Method

Allowing Non-Component Callers

Using Application-Scoped Resources

Restrictions and Optimizations

Disabling Stored Procedure Creation on Sybase

15.  Using the Transaction Service

16.  Using the Java Naming and Directory Interface

17.  Using the Java Message Service

18.  Using the JavaMail API

Index

Allowing Non-Component Callers

You can allow non-Java-EE components, such as servlet filters, lifecycle modules, and third party persistence managers, to use this JDBC connection pool. The returned connection is automatically enlisted with the transaction context obtained from the transaction manager. Standard Java EE components can also use such pools. Connections obtained by non-component callers are not automatically closed at the end of a transaction by the container. They must be explicitly closed by the caller.

You can enable non-component callers in the following ways:

Accessing a DataSource using the Synchronization.beforeCompletion() method requires setting Allow Non Component Callers to true. For more information about the Transaction Synchronization Registry, see The Transaction Manager, the Transaction Synchronization Registry, and UserTransaction.