Ejemplo n.º 1
0
 /**
  * Gets a handle to a connection object in the given application. This version opens the
  * connection by name If param is null or "" get the first connection available
  *
  * @param lAppID the appid of the application to get the connection for
  * @param sConnectionName the name of the connection
  * @return the JDBC connection object
  * @throws an Exception if there was a problem getting the connection
  */
 public Connection getDataConnection(long lAppID, String sConnectionName) throws Exception {
   TornadoServerInstance tsi = TornadoServer.getInstance();
   TornadoApplication ta = tsi.getTornadoApplication(lAppID);
   Connection cx = ta.getDataConnection(sConnectionName);
   m_htConnections.put(cx, cx);
   return cx;
 }
Ejemplo n.º 2
0
 /**
  * Gets a handle to a connection object. This version opens the connection by name If param is
  * null or "" get the first connection available
  *
  * @param sConnectionName the name of the connection as it appears in the application's design
  * @return a JDBC connection object, null if one could not be opened
  */
 public Connection getDataConnection(String sConnectionName) throws Exception {
   m_iDataConnGetCount++;
   TornadoServerInstance tsi = TornadoServer.getInstance();
   TornadoApplication ta = tsi.getTornadoApplication(m_rPath.getPathToApplication());
   return ta.getDataConnection(sConnectionName);
 }