JNDI


Configuring JDBC DataSource and binding it as Tomcat JNDI Resource

     

To configure the JDBC DataSource as a Global JNDI Resource in tomcat and use it in SplashBI we want to implement the following 3 steps:


  1. Configure the DataSource with all the necessary properties in tomcat server.xml
  2. Configure the resource reference in context.xml.
  3. Configure the JNDI resource name in SplashBI Connection creation.


Configure the DataSource with all the necessary properties in tomcat server.xml


  1. Open server.xml; the user can find it in following folder: <CATALINA_HOME>\conf.
  2. Search for Global Naming  Resources tag. Search with following text to locate <GlobalNamingResources>.
  3. Add the following tags next line after the <GlobalNamingResources>
    <Resource name="change_with_jndi_name " type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url=" change_with_your_database_url"username="change_with_your_database_user_name" password="change_with_your_database_user_password"/>
  • database_url: /jdbc:oracle:thin:@ your_database_host_name_or_ipaddress:1521: your_database_oracle_SID
  • jndi_name: some_unique_name


Configure the resource reference in context.xml


  1. Open context.xml : <CATALINA_HOME>/conf/.
  2. Add the following tags in <Context>
    <ResourceLink type="javax.sql.DataSource" name="change_with_jndi_ref_name"global=" change_with_jndi_name "/>


  • jndi_name: This is the JNDI Name which have been given in server.xml file in Step1.


  • jndi_ref_name: Some unique name; this name is used in SplashBI while creating the connection, as JNDI Name.



Configure the JNDI resource name in SplashBI Connection creation

While creating the connection in SplashBI select the JNDI  radio button and provide the following details:


  • JNDI service: Local.
  • Database Type: Select Oracle.
  • JNDI Resource: Enter the jndi_ref_name given in Step2.


Binding JDBC Weblogic DataSource as SplashBI Tomcat JNDI Resource


Prepare weblogic client jar file

These steps have to be done in weblogic server.


  1. Login to Command prompt of a Weblogic resident server (Using PuTTY for example in case of Linux).
  2. Go to <Weblogic Server Home>/server/lib.
  3. Run the command: java -jar wljarbuilder.jar.
  4. A new jar file is created in current working directory wlfullclient.jar.


Move necessary jar files to Tomcat server

These steps have to be done in Tomcat server where SplashBI is deployed.


  1. Login to Command prompt of a Tomcat resident server (Using PuTTY for example in case of Linux).
  2. Go to <tomcat_home>/lib.
  3. Move the previous step's wlfullclient.jar to the above location.
  4. Move <tomcat_home>/webapps/SplashBI/WEB-INF/lib/ojdbc*.jar to <tomcat_home>/lib.
  5. And <tomcat_home>/webapps/SplashBI/WEB-INF/lib/mysql*.jar to <tomcat_home>/lib.
  6. Do not have any library related to database in <tomcat_home>/webapps/SplashBI/WEB-INF/lib.
  7. Restart the tomcat server.


Configure the Weblogic JNDI connection (To use in SplashBI tomcat server)

  1. Create a datasource in weblogic using following steps.
  2. Make sure the user has deployed the above JNDI resource to the server where needed.
  3. Enable Remote JDBC in weblogic server where the user deployed the connection in 2nd step.


Configure the Weblogic JNDI connection in SplashBI web application


  1. Create a connection in SplashBI.
  2. Select JNDI radio button from the available values.
  3. Select Weblogic in JNDI Service.
  4. Provide all the required fields like Connection name, URL, User name, password, Connection Type, System, and JNDI Resource.


  • Connection Name:  A Unique name for the connection in SplashBI.
  • URL: Weblogic server URL where the JNDI resource is deployed.
  • Username: Weblogic Username of server where the JNDI resource is deployed.
  • Password: Weblogic Password of server where the JNDI resource is deployed.
  • Connection Type: Oracle/MySQL/SQL Server etc.. based on the JNDI resource created in weblogic.
  • System: Oracle E-Business Suite/None/Peoplesoft etc., based on the database source.