Class DataSourceCloser

  • All Implemented Interfaces:
    Destroyable

    public class DataSourceCloser
    extends java.lang.Object
    implements Destroyable
    Close a DataSource. Some DataSource's need to be close (eg. Atomikos). This bean is a Destroyable and may be added to any ContainerLifeCycle so that destroy() will be called. The destroy() method calls any no-arg method called "close" on the passed DataSource.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) javax.sql.DataSource _datasource  
      (package private) java.lang.String _shutdown  
      private static Logger LOG  
    • Constructor Summary

      Constructors 
      Constructor Description
      DataSourceCloser​(javax.sql.DataSource datasource)  
      DataSourceCloser​(javax.sql.DataSource datasource, java.lang.String shutdownSQL)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        private static final Logger LOG
      • _datasource

        final javax.sql.DataSource _datasource
      • _shutdown

        final java.lang.String _shutdown
    • Constructor Detail

      • DataSourceCloser

        public DataSourceCloser​(javax.sql.DataSource datasource)
      • DataSourceCloser

        public DataSourceCloser​(javax.sql.DataSource datasource,
                                java.lang.String shutdownSQL)