devloop icon
Metastores

Default data source

Without going into too much detail on how to configure the core of the framework, the easiest way of setting the default data source is to define the value of com.metastores.system.database.meta.type.JNDIDataSource
Below we give some examples of how to set this value:

Using a properties file, by placing the contents below in a properties file named "default.properties" placed in a directory called "/config" on the classpath:

    com.metastores.system.database.meta.type.JNDIDataSource=jdbc/MyDataSourceName
	
Note: to define the data source for a specific package, place the properties file in a sub directory, ie: in "/config/com" it would only apply to classes in the com package.
On the command line when launching the application:

java -Dcom.metastores.system.database.meta.type.JNDIDataSource=jdbc/MyDataSourceName
   	com.package.ProgramName
	
Note that this option applies globally, rather than per class or per package.
Directly in the code using an annotation:

    @JNDIDataSource("jdbc/MyDataSourceName")
    public	class	MyClass {
    	...
	

See the configuration guide for more options.

Quick Links