Class JNDIDataSourceFactory

    • Constructor Detail

      • JNDIDataSourceFactory

        public JNDIDataSourceFactory()
    • Method Detail

      • createDataSource

        public DataSource createDataSource​(Map<String,​?> params)
                                    throws IOException
        Description copied from interface: DataSourceFactorySpi
        Construct a live data source using the params specifed. The returned DataSource may be pooled.
        params - The full set of information needed to construct a live DataSource.
        The created DataSource, this may be null if the required resource was not found or if insufficent parameters were given. Note that canProcess() should have returned false if the problem is to do with insuficent parameters.
        IOException - if there were any problems setting up (creating or connecting) the datasource.
      • canProcess

        public boolean canProcess​(Map<String,​?> params)
        Description copied from interface: DataSourceFactorySpi
        Test to see if this factory is suitable for processing the data pointed to by the params map.

        If this data source requires a number of parameters then this mehtod should check that they are all present and that they are all valid.

        Specified by:
        canProcess in interface DataSourceFactorySpi
        canProcess in class AbstractDataSourceFactorySpi
        params - The full set of information needed to construct a live data source.
        booean true if and only if this factory can process the resource indicated by the param set and all the required params are pressent.
      • getDescription

        public String getDescription()
        Description copied from interface: DataSourceFactorySpi
        Describe the nature of the data source constructed by this factory.

        A non localized description of this data store type.

        A human readable description that is suitable for inclusion in a list of available datasources.
      • isAvailable

        public boolean isAvailable()
        Make sure a JNDI context is available
        true if and only if this factory has all the appropriate jars on the classpath to create DataSource.