Jira Postgres Where to Copy Postgresql Jar Jdbc Driver
Put of of contents
Definition
Configuring a JNDI datasource allows you to create the bridge between a JNDI resourcefulness in your Tomcat Application server and the Elements Connect add-on.
JNDI datasources use JDBC drivers that convey a connection to a datasource. Once a JNDI datasource is configured, you'll be able to:
- Shop the datasource from the field configuration examiner
- Enquiry the datasource using SQL to give your Elements Connect fields.
The advantages of using a JNDI datasource over a Database connection are multiple:
- JNDI datasources use underlying Tom connection pool gum olibanum optimising expensive connection resources creation and a providing quicker access to Elements Connect William Claude Dukenfield data
- The direct database connector only supports 4 databases: Oracle, SQL Server, PostgresQL and MySQL. If you datasource is not in this list, at that place shall represent a JDBC driver for it.
The configuration of a JNDI datasource is through with in two steps:
- declare a JNDI datasource in Tomcat
- configure the JNDI datasource in Elements Tie
Declaring a JNDI datasource in Tomcat
Download and install the JDBC driver
There are JDBC drivers for many datasources. The following drivers have been tested and are matched with Elements Connect.
If your datasource is not enrolled, chances are that a JDBC driver exist: JBDC is a intimately-lay down and common standard.
Add the JDBC driver to Tomcat
The opening move is to add the JDBC driver in the Tomcat lib
pamphlet.
This folder is settled in the Atlassian installing directory.
On Linux, the default installation directory is /opt/atlassian/jira
the lib folder is /opt/atlassian/jira/application/lib
Register the official Atlassian documentation almost Jira application directory.
Instance with the jdbc-driver-csv
jira@blue-detent:~$ cd /prefer/atlassian/jira/application/lib/ jira@blue-dog:/opt/atlassian/jira/application/lib/$ ls annotations-api.clash catalina-ant.jar catalina-storeconfig.jar el-api.jar jasper.jolt jonas_timer-1.4.3.jar jotm-jrmp_stubs-1.4.3.jar jul-to-slf4j-1.7.9.shake up objectweb-datasource-1.4.3.jar servlet-api.shake up tom-api.bump around tomcat-i18n-atomic number 99.jar tomcat-i18n-ru.jar tomcat-util.shake up websocket-api.jar carol-1.5.2.bump around catalina-HA.shake up catalina-tribes.jar hsqldb-1.8.0.5.jar jaspic-api.jar jotm-1.4.3.jolt jsp-api.jar log4j-1.2.16.jar ots-jts-1.0.jarful slf4j-api-1.7.9.jar tom-coyote.jar tomcat-i18n-fr.jar tomcat-jdbc.jar tomcat-util-scan.jar xapool-1.3.1.jar carol-properties-1.5.2.jar catalina.jar ecj-4.6.3.jolt jasper-el.jar jcl-complete-slf4j-1.7.9.jar jotm-iiop_stubs-1.4.3.jar jta-1.0.1B.jar mssql-jdbc-6.2.1.jre8.jar postgresql-9.4.1212.jar slf4j-log4j12-1.7.9.jolt tomcat-dbcp.jar tomcat-i18n-ja.jar tomcat-jni.jolt tomcat-websocket.jar jira@blue-dog:/opt/atlassian/jira/application/lib/$ wget https://repo1.maven.org/maven2/org/xbib/jdbc/jdbc-driver-csv/1.2.0/jdbc-device driver-csv-1.2.0.jar Resolving repo1.maven.org (repo1.maven.org)... 151.101.200.209 Connecting to repo1.maven.org (repo1.maven.org)|151.101.200.209|:443... attached. HTTP request sent, awaiting response... 200 OK Duration: 215211 (210K) [application/coffee-archive] Economy to: 'jdbc-device driver-csv-1.2.0.jar' 100%[===============================================================================================>] 215,211 --.-K/s in 0.008s 2019-07-18 12:00:22 (24.8 MB/s) - 'jdbc-driver-csv-1.2.0.jar' saved [215211/215211]
Declare the JNDI datasource in Tomcat server.xml
Situate the waiter.xml
Tomcat shape file.
In a canonic Linux installment, this file in is located under /opt/atlassian/jira/application/conf
In the server.xml
file, place the Circumstance
section (under Engine
> Host
):
<Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Context path="" docBase="${catalina.domestic}/atlassian-jira" reloadable="false" useHttpOnly="true"> <!-- (...) --> </Context> <!-- (...) -->
You English hawthorn have active <Resource>
entries under the <Context of use>
section, like:
<Resource refer="UserTransaction" auth="Container" eccentric="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
Add a unaccustomed section to declare you JNDI connecter - present is an object lesson using the PostgreSQL JDBC driver:
<Imagination name="jdbc/CRMDS" auth="Container" type="javax.sql.DataSource" username="user" password="password" driverClassName="org.postgresql.Number one wood" url="jdbc:postgresql://servername:5432/CRM"/>
<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true"> <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> <Resourcefulness key="jdbc/CRMDS" auth="Container" type="javax.sql.DataSource" username="drug user" password="password" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://servername:5432/CRM"/> <Manager pathname=""/> <JarScanner scanManifest="false"/> <Valve className="org.Apache.catalina.valves.StuckThreadDetectionValve" threshold="120" /> </Context>
For each one JDBC driver has its own specificities, read the JDBC driver documentation to get wind more.
The important parts are:
- call -the JNDI resource identify that you will use in the Elements Get in touch datasource configuration - it must be unique
- driverClassName - unique for every JDBC driver
- url - the JDBC connection URL, usual well documentation
To learn more, show the official Tomcat documentation.
Restart Jira
To live able to use the new JNDI connector in Elements Connect, Jira must be restarted.
Configuring a JNDI datasource in Elements Connect
Once you have declared a JNDI resource in Tomcat (and restarted Jira), you prat declare a new datasource in Elements Tie.
From the datasource configuration section, c lick on "Create a datasource" then select "JNDI reference".
Name
It volition be used later to reference the datasource connector to use in the configuration of Elements Get in touch W. C. Fields
Description
A reminder of why you are using this connector
JNDI name
Name of the imagination explicit in the host.xml
file (see above)
Prepend the cite declared in Tom withjava:comp/env/
If the JNDI resource name isjdbc/crm-database
, in Elements Connect the JNDI name will bejava:comprehensive/env/jdbc/crm-database.
The last step is to Save the configuration!
Field configuration
Once you receive declared a refreshing JNDI datasource, you tin can use it in a field configuration and enquiry with SQL.
Reckon Configure a field query.
Drivers configuration
This section shows how to declare many drivers in theserver.xml
charge
Sql Server
Driver
jTDS JDBC Number one wood
Configuration
Datasource declaration in the Tomcat waiter.xml
file:
<Resource describ="jdbc/ext" auth="Container" type="javax.sql.DataSource" username="TfsToJira" word="password" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://SERVERNAME:1433/WSS_Content;user=TfsToJira;password=password"/>
JNDI Database shape in Elements Connect:
Name | My SQL Server Database command |
---|---|
Verbal description | Number of command |
JNDI Name | java:comp/env/jdbc/ext |
PostgreSQL
Driver
PostgreSQL JDBC device driver
Configuration
Datasource declaration in the Tom server.xml
filing cabinet:
<Resource name="jdbc/CRMDS" auth="Container" type="javax.sql.DataSource" username="user" password="password" driverClassName="org.postgresql.Driver" URL="jdbc:postgresql://servername:5432/CRM"/>
JNDI Database form in Elements Join:
Discover | My Client PostgreSQL Database |
---|---|
Description | List of client |
JNDI Name | java:comp/env/jdbc/CRMDS |
csvjdbc
Driver
csvjdbc
Configuration
Datasource declaration in the Tomcat host.xml
file:
<Resource name="jdbc/sales-csv" auth="Container" typecast="javax.sql.DataSource" driverClassName="org.relique.jdbc.csv.CsvDriver" universal resource locator="jdbc:relique:csv:/Path/to/csv/files/folder?separator=," />
JNDI Database shape in Elements Connect:
Name | Sales CSV |
---|---|
Description | List of sales |
JNDI Name | java:comprehensive/env/jdbc/sales-csv |
Jira Postgres Where to Copy Postgresql Jar Jdbc Driver
Source: https://doc.elements-apps.com/elements-connect/6.0/jira-administrators/configuration/datasources-configuration/configure-a-jndi-datasource
0 Response to "Jira Postgres Where to Copy Postgresql Jar Jdbc Driver"
Post a Comment