code: protected static void configureTransactionSynchronizationRegistry(final Context _compCtx,
                                                                        final String _classTSR)
          throws StartupException
      {
          try {
  
              final Object clzz = Class.forName(_classTSR).newInstance();
              if (clzz == null) {
                  throw new StartupException("could not initaliase database type");
              } else {
                  if (clzz instanceof TransactionSynchronizationRegistry) {
                      Util.bind(_compCtx, "env/" + INamingBinds.RESOURCE_TRANSSYNREG, clzz);
                      Util.bind(_compCtx, "TransactionSynchronizationRegistry", clzz);
                  } else if (clzz instanceof ObjectFactory) {
                      final Reference ref = new Reference(TransactionSynchronizationRegistry.class.getName(), clzz
                                      .getClass().getName(), null);
                      Util.bind(_compCtx, "env/" + INamingBinds.RESOURCE_TRANSSYNREG, ref);
                      Util.bind(_compCtx, "TransactionSynchronizationRegistry", ref);
                  }
              }
  
          } catch (final ClassNotFoundException e) {
              throw new StartupException("could not found TransactionSynchronizationRegistry '" + _classTSR + "'", e);
          } catch (final InstantiationException e) {
              throw new StartupException("could not initialise TransactionSynchronizationRegistry class '" + _classTSR
                              + "'", e);
          } catch (final IllegalAccessException e) {
              throw new StartupException("could not access TransactionSynchronizationRegistry class '" + _classTSR + "'",
                              e);
          } catch (final NamingException e) {
              throw new StartupException("could not bind Transaction Synchronization Registry class '"
                              + _classTSR + "'", e);
          }
      }
docs: The class defined with parameter _classTM initialized and bind to {@link #RESOURCE_TRANSSYNREG}. The initialized
  class must implement interface {@link TransactionSynchronizationRegistry}.
  
  @param _compCtx Java root naming context
  @param _classTSR class name of the transaction SynchronizationRegistry
  @throws StartupException if the transaction manager class could not be found, initialized, accessed or bind to
  the context