Class DatabaseClientManager

  • All Implemented Interfaces:
    org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<com.marklogic.client.DatabaseClient>

    public class DatabaseClientManager
    extends LoggingObject
    implements org.springframework.beans.factory.FactoryBean<com.marklogic.client.DatabaseClient>, org.springframework.beans.factory.DisposableBean
    Hooks into Spring container lifecycle so that the DatabaseClient is initialized when the container starts up and released when the container shuts down.

    Note that ML7 has a DatabaseClientFactory.Bean that removes the need for most of this code, although it does not have a "destroy" method that would handle releasing the DatabaseClient that it begins.

    • Constructor Detail

      • DatabaseClientManager

        public DatabaseClientManager()
    • Method Detail

      • getObject

        public com.marklogic.client.DatabaseClient getObject()
        Specified by:
        getObject in interface org.springframework.beans.factory.FactoryBean<com.marklogic.client.DatabaseClient>
      • getObjectType

        public java.lang.Class<?> getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<com.marklogic.client.DatabaseClient>
      • isSingleton

        public boolean isSingleton()
        Specified by:
        isSingleton in interface org.springframework.beans.factory.FactoryBean<com.marklogic.client.DatabaseClient>
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean