C O N N E C T I N G   T O   D A T A B A S E S   A N D   O T H E R   R E S O U R C E   M A N A G E R S  
Chapter  
10 
10.  Connecting to Databases and other Resource Managers 
The world of JCA by David Jencks 
All connections to databases and other resource managers in jboss 3 are handled through 
the JCA framework.  JCA provides a well thought out model in which the application server 
handles transactions, security, and pooling or resource management, and the client 
application code is left free to concentrate on doing useful work.  Few databases currently 
supply JCA adapters, so normally database drivers are used through jca jdbc wrappers.  
Databases such as firebird and other resource managers such as SAP, CICS, etc can be 
accessed directly through jca adapters. 
To use a JCA adapter or wrapped jdbc driver, you must configure 3 mbeans and a JAAS 
security domain.  Examples of configurations for popular databases are supplied in the  
docs/examples/jca directory. The mbeans are shown there in a nested format which makes 
their relationship clear.  The ConnectionManager mbean determines the level of transaction 
support for the adapter deployment.  The choices are 
org.jboss.resource.connectionmanager.NoTxConnectionManager, for adapters that do not 
support transactions or adapters for which you want only autocommit behavior, 
org.jboss.resource.connectionmanager.LocalTxConnectionManager, for adapters such as 
wrapped non xa jdbc drivers that support only local (one phase) transactions, and 
org.jboss.resource.connectionmanager.XaTxConnectionManager, for adapters that support 
xa transactions.  If you have a choice, use xa transaction support for better concurrency and 
less chance of resource deadlock.  Along with the references to the other two required 
mbeans, the crucial configuration bit here is the  
name="SecurityDomainJndiName">java:/jaas/MyAdapterRealm  which 
identifies the JAAS security domain used for container managed security.  For the example 
here, you must include a realm in your login conf.xml file like this: 
 
     
        
          flag = "required"> 
            yourprincipal 
            yourusername 
            yourpassword 
             
98






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

best web hosting

 

Our partners: PHP: Hypertext Preprocessor Cheap Web Hosting JSP Web Hosting Ontario Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Java Hosting Cheapest Hosting

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved