JSlim  


com.gtcgroup.jslim
Class _ServiceTypesSuper

java.lang.Object
  extended bycom.gtcgroup.jslim._ServiceTypesSuper
Direct Known Subclasses:
_ConnectionX, _EJBRemote, _EJBRemoteX, _IncrementX, _JDBC, _LocalContext, _QueueSendX, _RemoteContextX

abstract class _ServiceTypesSuper
extends java.lang.Object

This utility superclass provides "Template Methods" and shared exception handling.

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
(package private) _ServiceTypesSuper()
           
 
Method Summary
private static ServiceKeyVO addJNDIname(ServiceKeyVO serviceKeyVO, int intServiceType, java.lang.String strServiceKey)
           
(package private) static boolean closeConnection(java.sql.Connection connection)
          A convenience method for closing a Connection.
private static java.lang.Object getJNDIobject(ServiceKeyVO serviceKeyVO, boolean blnDescriptorDocRequired)
           
(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 java.lang.Object LookupJNDI(JSlimInitialContext jSlimInitialContext, ServiceKeyVO serviceKeyVO, java.lang.Object object)
           
(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

_ServiceTypesSuper

_ServiceTypesSuper()
Method Detail

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.

addJNDIname

private static final ServiceKeyVO addJNDIname(ServiceKeyVO serviceKeyVO,
                                              int intServiceType,
                                              java.lang.String strServiceKey)

getJNDIobject

private static final java.lang.Object getJNDIobject(ServiceKeyVO serviceKeyVO,
                                                    boolean blnDescriptorDocRequired)
                                             throws JSlimException
Throws:
JSlimException

LookupJNDI

private static java.lang.Object LookupJNDI(JSlimInitialContext jSlimInitialContext,
                                           ServiceKeyVO serviceKeyVO,
                                           java.lang.Object object)
                                    throws JSlimException
Throws:
JSlimException

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.