本記事では CData サポート担当からこんなことを聞かれたらどこを確認すべきか?という観点で、よく頂くお問合せ内容をご紹介します。
記事はこちら →CData JDBC Drivers は標準JDBC インターフェースをサポートし、JVM 上で実行されるWeb アプリケーションに統合します。この記事では、Tomcat のConnection Pool からBullhorn CRM に接続する方法について詳しく説明します。
Begin by providing your Bullhorn CRM account credentials in the following:
If you are uncertain about your data center code, codes like CLS2, CLS21, etc. are cluster IDs that are contained in a user's browser URL (address bar) once they are logged in.
Example: https://cls21.bullhornstaffing.com/BullhornSTAFFING/MainFrame.jsp?#no-ba... indicates that the logged in user is on CLS21.
Bullhorn CRM uses the OAuth 2.0 authentication standard. To authenticate using OAuth, create and configure a custom OAuth app. See the Help documentation for more information.
<Resource name="jdbc/bullhorncrm" auth="Container" type="javax.sql.DataSource" driverClassName="cdata.jdbc.bullhorncrm.BullhornCRMDriver" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" url="jdbc:bullhorncrm:DataCenterCode=CLS33;OAuthClientId=myoauthclientid;OAuthClientSecret=myoauthclientsecret;" maxActive="20" maxIdle="10" maxWait="-1" />
一つのアプリケーションからBullhorn CRM へのアクセスを許可するには、上のコードをアプリケーションのMETA-INF ディレクトリにあるcontext.xml に追加します。
共有リソースの設定には、上のコードを$CATALINA_BASE/conf 内にあるcontext.xml に追加します。共有リソースの設定は、すべてのアプリケーションにSalesforce への接続を提供します。
Bullhorn CRM data JSP
jdbc/BullhornCRM
javax.sql.DataSource
コンテナ
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/BullhornCRM");
Connection conn = ds.getConnection();
上記の手順では、簡単なコネクションプーリングのシナリオでBullhorn CRM に接続する方法を説明しました。ほかの使用例や情報については、 Tomcat 製品ドキュメントの 「JNDI Datasource How-To」をご覧ください。