====== Data source definitions ====== {{vibecat:page-datasources.png?800|Vibecat administration: Data sources page (playground instance)}} Every data source has these fields (stored in ''vibecat.json'' under ''datasources''): ^ Field ^ Meaning ^ | On | Switches the data source on or off; off removes it from the contexts. | | JNDI name | The name below ''java:comp/env'', for example ''jdbc/eloam''. The web application looks up ''java:comp/env/jdbc/eloam''. | | Driver class | The JDBC driver class from [[vibecat:datasources_drivers|the lib folder]]. | | JDBC URL | Connection string without credentials. | | User / Password | Credentials; the password is stored in the configuration and written to backups only encrypted. | | Applications | The web applications that see the data source. Empty = every web application. | | Max total / max idle / min idle | Pool sizes (default 20 / 10 / 0). | | Max wait (ms) | How long a request waits for a free connection (default 30000). | | Validation query | For example ''select 1''; used by **Test** and to check idle connections. | | Connection properties | Extra driver properties: ''name=value;name=value''. | | Description | Free text, shown in the list and in the global documentation. | ==== Example ==== The playground instance has the definition ''jdbc/demo'': driver ''org.postgresql.Driver'', URL ''jdbc:postgresql://dbhost.example:5432/demo'', pool 20 / 10, validation query ''select 1'', visible to every application. ==== REST ==== ''GET /api/datasources'', ''POST /api/datasources'', ''PUT|DELETE /api/datasources/'' (administrators only), ''GET /api/jdbc/...'' for the driver list. A change deploys the affected applications again.