10.07.2015 Views

JDBC Developer's Guide - Supra - Cincom

JDBC Developer's Guide - Supra - Cincom

JDBC Developer's Guide - Supra - Cincom

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Automatic custom mappingWhen you enable automatic custom mapping for ordbObject and/orordbCollection, then all object references that have a custom map defined willgenerate new instances of the custom mapped class.Care should be taken when enabling automatic custom mapping for largecollections of objects, and objects that contain many object references.Connection poolingDatabase connects and disconnects are time-consuming. If your applicationneeds to frequently connect and disconnect from the <strong>Cincom</strong> ORDB databaseusing the same username and password, you should consider using connectionpooling.The <strong>Cincom</strong> ORDB <strong>JDBC</strong> driver can maintain a pool of database connectionsthat are available for new connection requests.When connection pooling is enabled, the Connection.close() method willperform the following steps:1. A rollback will be issued on the database connection.2. All database resources (resultSets, Statements, etc) for the connection willbe released.3. The connection will be added to a pool of available connections.When connection pooling is enabled, the Driver.connect() method will checkthe available connections that matches the database, user, password, andlanguage being requested. If a match is found, then the existing connectionwill be used. If not found, then a new database connection will be established.A daemon process is utilized to perform database disconnects on unusedconnection in the available pool. This will take place on a timer controlled bythe application.Two static methods of ordbDriver are used to control connection pooling.These methods are:♦♦setConnectPoolTimeout(long milliseconds)long getConnectPoolTimeout()<strong>JDBC</strong> <strong>Developer's</strong> <strong>Guide</strong>, P25-9504-03 Page 89Chapter: 6. Coding tips and troubleshootingSection: Performance optimization

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!