Class DataSourceCloser

  • All Implemented Interfaces:
    org.eclipse.jetty.util.component.Destroyable

    public class DataSourceCloser
    extends Object
    implements org.eclipse.jetty.util.component.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.
    • Constructor Detail

      • DataSourceCloser

        public DataSourceCloser​(DataSource datasource)
      • DataSourceCloser

        public DataSourceCloser​(DataSource datasource,
                                String shutdownSQL)
    • Method Detail

      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.eclipse.jetty.util.component.Destroyable