Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*-
   * See the file LICENSE for redistribution information.
   *
   * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
   *
   */
  
  package com.sleepycat.je.jca.ra;
  
 import  javax.resource.ResourceException;
 
A JEConnection provides access to JE services. See <JEHOME>/examples/jca/HOWTO-**.txt and <JEHOME>/examples/jca/simple/SimpleBean.java for more information on how to build the resource adaptor and use a JEConnection.
 
 public class JEConnection implements Closeable {
 
     private JEManagedConnection mc;
     private JELocalTransaction txn;
 
     public JEConnection(JEManagedConnection mc) {
         this. = mc;
     }
 
     protected void setManagedConnection(JEManagedConnection mc,
                                         JELocalTransaction lt) {
         this. = mc;
         if ( == null) {
              = lt;
         }
     }
 
         return ;
     }
 
     void setLocalTransaction(JELocalTransaction txn) {
         this. = txn;
     }
 
     public Environment getEnvironment() {
         return .getEnvironment();
     }
 
     public Database openDatabase(String nameDatabaseConfig config)
         throws DatabaseException {
 
         return .openDatabase(nameconfig);
     }
 
                                                    Database primaryDatabase,
                                                    SecondaryConfig config)
         throws DatabaseException {
 
         return .openSecondaryDatabase(nameprimaryDatabaseconfig);
     }
 
     public void removeDatabase(String databaseName)
         throws DatabaseException {
 
         .removeDatabase(databaseName);
     }
 
     public long truncateDatabase(String databaseNameboolean returnCount)
         throws DatabaseException {
 
         return .truncateDatabase(databaseNamereturnCount);
     }
 
     public Transaction getTransaction()
         throws ResourceException {
 
         if ( == null) {
             return null;
         }
 
         try {
             return .getTransaction();
         } catch (DatabaseException DE) {
             ResourceException ret = new ResourceException(DE.toString());
             ret.initCause(DE);
             throw ret;
         }
     }
 
     public void close() {
         .close();
    }
New to GrepCode? Check out our FAQ X