View RSS Feed

Recent Blogs Posts

  1. Working with JDBC in Java

    by , 04-04-2012 at 06:32 AM
    Java Database Connectivity (JDBC) is a technology that allows Java applications working with relational database management systems (RDBMS) such as MySQL, Microsoft SQL Server, Oracle, PostgreSQL, … via Structured Query Language (SQL) statement. The JDBC API is included in JDK, so any Java application can communicate with various database systems without requiring additional installation, as long as a JDBC driver is provided for the targeted database system.

    By the end of this article, ...
  2. The Java Database Connectivity (JDBC)

    by , 03-09-2012 at 07:31 PM
    Java Database Connectivity JDBC API is considered to be a database’s industry standard. An independent connectivity is provided by it b/w range of databases and Java programming language. Like
    • Tabular data sources e.g. flat files and spreadsheet.
    • SQL databases


    To access SQL based database, call level API is provided by JDBC API.

    In Java programming language, JDBC technology is used to “write once, Run Anywhere” capabilities. This is done for those applications ...
    Tags: jdbc Add / Edit Tags
    Categories
    JDBC
  3. Batch updates

    by , 11-11-2011 at 05:41 PM (My Java Tips)
    Updating a record from Java using executeUpdate() method of Statement object is used commonly by JDBC programmers. Thing to note is that this is a costly activity in terms of time, as a database trip is made. As a programmer/developer, our aim should be to write efficient Java code. In this post, I will write about how you can efficiently make several updates.


    Batch update allows us to execute several update statements in a batch. It means only one database trip will be make, thus ...
    Categories
    JDBC
  4. Connectiong To MS Access And Fetching Records

    by , 11-08-2011 at 06:37 PM (My Java Tips)
    JDBC (Java Database Connectivity) is designed to allow user to use SQL(Structured Query Language) to query databases. JDBC makes our tasks easy as it handles all low-level concerns about particular database types. It allows you to query an Access database with exactly the same source code as with an Oracle database.

    JDBC is similar to Microsoft's ODBC with the plus point "Platform Independence". To use JDBC, you need to have database driver to communicate with the database. ...
    Tags: jdbc, sql Add / Edit Tags
    Categories
    JDBC
  5. Wrapping JDBC Objects

    by , 05-25-2011 at 09:55 AM (My Java Tips)
    In Glassfish connection pool has a property called "Wrap JDBC Objects" which can have value true or false. You may define it in domain.xml file.

    This property is defined as: "When set to true, application will get wrapped jdbc objects for Statement, PreparedStatement, CallableStatement, ResultSet, DatabaseMetaData".

    If you follow JDBC specifications, you will be see that obtaining connection using DataSource.getConnection() or other objects like ...
  6. hibernate.connection.rele ase_mode

    by , 05-25-2011 at 09:49 AM (My Java Tips)
    Hibernate JDBC/Connection's property hibernate.connection.release_mode is used to specify when Hibernate should release JDBC connections.

    A JDBC connection is held until the session is explicitly closed or disconnected by default. For a JTA datasource, one should use after_statement to aggressively release connections after every JDBC call. And for a non-JTA connection, it often makes sense to release the connection at the end of each transaction. after_transaction.auto will
    ...
    Categories
    Hibernate
  7. Hibernate logging

    by , 05-21-2011 at 10:36 PM (My Java Tips)
    Hibernate logs various events using Apache commons-logging. Hibernate logs are very interesting to read if you want to do some troubleshooting or performance improvement. Hibernate uses commons-logging service for logging. It actually sends the log to either Log4j or to JDK1.4 logging.

    If you want hibernate to log using Log4j, then put log4j.jar into class path along with log4j.properties. Since log4j has almost become a standard these days, I would advice using that.
    Hibernate ...
    Tags: hql, jdbc, log4j, logging, sql Add / Edit Tags
    Categories
    Hibernate