Package com.webobjects.jdbcadaptor

Examples of com.webobjects.jdbcadaptor.JDBCContext


      boolean channelOpen = adaptorChannel.isOpen();
      if (!channelOpen) {
        adaptorChannel.openChannel();
      }
      try {
        JDBCContext jdbccontext = (JDBCContext) adaptorChannel.adaptorContext();
        try {
          jdbccontext.beginTransaction();
          Connection conn = jdbccontext.connection();
          Statement stmt = conn.createStatement();
          stmt.executeUpdate(sql);
          conn.commit();
        } catch (SQLException sqlexception) {
          sqlexception.printStackTrace(System.out);
          jdbccontext.rollbackTransaction();
          throw sqlexception;
        }
      } finally {
        if (!channelOpen) {
          adaptorChannel.closeChannel();
View Full Code Here


      boolean channelOpen = adaptorChannel.isOpen();
      if (!channelOpen) {
        adaptorChannel.openChannel();
      }
      try {
        JDBCContext jdbccontext = (JDBCContext) adaptorChannel.adaptorContext();
        try {
          jdbccontext.beginTransaction();
          Connection conn = jdbccontext.connection();
          Statement stmt = conn.createStatement();
          stmt.executeUpdate(sql);
          conn.commit();
        } catch (SQLException sqlexception) {
          sqlexception.printStackTrace(System.out);
          jdbccontext.rollbackTransaction();
          throw sqlexception;
        }
      } finally {
        if (!channelOpen) {
          adaptorChannel.closeChannel();
View Full Code Here

TOP

Related Classes of com.webobjects.jdbcadaptor.JDBCContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.