JSlim  


com.gtcgroup.jslim
Class _JDBC

java.lang.Object
  extended bycom.gtcgroup.jslim._ServiceTypesSuper
      extended bycom.gtcgroup.jslim._JDBC

final class _JDBC
extends _ServiceTypesSuper

This utility class manages uncached _JDBC Connection objects for unit testing. The processing sequence is as follows:

Copyright (c) 1999 - 2004 by Global Technology Consulting Group, Inc. at gtcGroup.com.
Use is authorized, provided the source is acknowledged by inclusion of this copyright notice.

Since:
v. 1.0
Author:
MDT (MarvinToll@gtcGroup.com)

Constructor Summary
private _JDBC()
          Constructor.
 
Method Summary
(package private) static boolean closeConnection(java.sql.Connection connection)
          A convenience method for closing a Connection.
private static java.sql.Connection getJDBCConnection(ServiceKeyVO serviceKeyVO)
           
static java.sql.Connection getNewService(ServiceKeyVO serviceKeyVO)
          Returns a JDBC Connection.
(package private) static java.lang.Object getServiceCached(int intServiceType, java.lang.String strServiceKey, boolean blnDescriptorDocRequired)
          Inherited method returning a mapped service object.
(package private) static java.lang.Object getServicePooled(int intServiceType, java.lang.String strServiceKey, ServiceElementVO serviceElementVOoriginating)
          "Template Method" returning a pooled service object.
private static void registerDriver(ServiceKeyVO serviceKeyVO)
           
(package private) static void reThrowInstantiationProblem(ServicesSuperVO serviceSuperVO, java.lang.String strSourceClass, java.lang.String strSourceMethod, java.lang.Throwable throwable)
          Level - 640.
(package private) static void rethrowNamingException(JSlimInitialContext jSlimInitialContext, ServiceKeyVO serviceKeyVO, java.lang.String strSourceClass, java.lang.String strSourceMethod, javax.naming.NamingException namingException)
          Level - 640.
(package private) static void throwOnlyNullsException(ServiceElementVO serviceElementVO1, ServiceElementVO serviceElementVO2, java.lang.String strSourceClass, java.lang.String strSourceMethod)
          Level - 640.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

_JDBC

private _JDBC()
Constructor.

Method Detail

getNewService

public static final java.sql.Connection getNewService(ServiceKeyVO serviceKeyVO)
                                               throws JSlimException
Returns a JDBC Connection.

Parameters:
serviceKeyVO - A portion of a descriptor document representing one service.
Returns:
A JDBC Connection.
Throws:
JSlimException

registerDriver

private static final void registerDriver(ServiceKeyVO serviceKeyVO)
                                  throws JSlimException
Throws:
JSlimException

getJDBCConnection

private static final java.sql.Connection getJDBCConnection(ServiceKeyVO serviceKeyVO)
                                                    throws JSlimException
Throws:
JSlimException

getServicePooled

static java.lang.Object getServicePooled(int intServiceType,
                                         java.lang.String strServiceKey,
                                         ServiceElementVO serviceElementVOoriginating)
                                  throws JSlimException
"Template Method" returning a pooled service object.

Parameters:
intServiceType - Represents the service type read from a descriptor document.
strServiceKey - Represents the service key read from a descriptor document.
serviceElementVOoriginating - Immutable class containing text and descriptor document traceability.
Returns:
A new service object.
Throws:
JSlimException - if an exception encountered.

getServiceCached

static final java.lang.Object getServiceCached(int intServiceType,
                                               java.lang.String strServiceKey,
                                               boolean blnDescriptorDocRequired)
                                        throws JSlimException
Inherited method returning a mapped service object.

Parameters:
intServiceType - Represents the service type read from a descriptor document.
strServiceKey - Represents the service key read from a descriptor document.
blnDescriptorDocRequired -
Returns:
A service object.
Throws:
JSlimException - if an exception encountered.

rethrowNamingException

static final void rethrowNamingException(JSlimInitialContext jSlimInitialContext,
                                         ServiceKeyVO serviceKeyVO,
                                         java.lang.String strSourceClass,
                                         java.lang.String strSourceMethod,
                                         javax.naming.NamingException namingException)
                                  throws JSlimException
Level - 640.

Parameters:
jSlimInitialContext - Class extending InitialContext in order to override methods throwing a NamingException.
serviceKeyVO - A portion of a descriptor document representing one service.
strSourceClass - The class detecting the error.
strSourceMethod - The method detecting the error.
namingException - The originating exception.
Throws:
JSlimException - if an exception encountered.

throwOnlyNullsException

static final void throwOnlyNullsException(ServiceElementVO serviceElementVO1,
                                          ServiceElementVO serviceElementVO2,
                                          java.lang.String strSourceClass,
                                          java.lang.String strSourceMethod)
                                   throws JSlimException
Level - 640.

Parameters:
serviceElementVO1 - Immutable class containing text and descriptor document traceability.
serviceElementVO2 - Immutable class containing text and descriptor document traceability.
strSourceClass - The class detecting the error.
strSourceMethod - The method detecting the error.
Throws:
JSlimException - if an exception encountered.

reThrowInstantiationProblem

static final void reThrowInstantiationProblem(ServicesSuperVO serviceSuperVO,
                                              java.lang.String strSourceClass,
                                              java.lang.String strSourceMethod,
                                              java.lang.Throwable throwable)
                                       throws JSlimException
Level - 640.

Parameters:
serviceSuperVO - Abstract super-class providing variables for VOs.
strSourceClass - The class detecting the error.
strSourceMethod - The method detecting the error.
throwable - The originating exception.
Throws:
JSlimException - if an exception encountered.

closeConnection

static final boolean closeConnection(java.sql.Connection connection)
A convenience method for closing a Connection.

Parameters:
connection -
Returns:
Whether or not the Connection closed successfully.

JSlim  


Copyright (c) 1999 - 2004 by Global Technology Consulting Group, Inc. at gtcGroup.com.
Use is authorized, provided the source is acknowledged by inclusion of this copyright notice.