Solved

Configuring JNDI on Websphere for DB2

Posted on 2009-05-18
6
2,484 Views
Last Modified: 2013-12-11
Hi,
In our project we have different schemas in DB2. We want to configure JNDI in websphere in such a way that each JNDI points to separate database schema. But in websphere configuration we cannot specify the schema name. All that we specify is the userid. And in DB2 the default schema name is the userid. Thus the JNDI always points to the schema with name same as userid. How can i make JNDI to point to a different schema?
0
Comment
Question by:cuttieveenz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 168 total points
ID: 24415863
are you sure?
if i remember correctly, you can specify a value for current schema when you configure websphere
0
 
LVL 45

Assisted Solution

by:Kent Olsen
Kent Olsen earned 332 total points
ID: 24415902
Hi cuttie,

In database.properties, just set the schema name:

  DB2DAOFactory.database.schema.name=schemaABC



Kent
0
 

Author Comment

by:cuttieveenz
ID: 24415947
Where is this properties file? Also how does the JNDI map to the schema name in this file?
0
 

Author Comment

by:cuttieveenz
ID: 24416045
where is this properties file? and how does the JNDI map to the schema name in this file?bcoz in JNDI configuration only the useid,pwd is specified. also in the datasource configuration only the server name, DB name, port, driver type is mentioned.
0
 
LVL 45

Assisted Solution

by:Kent Olsen
Kent Olsen earned 332 total points
ID: 24416118
Hi cuttie,

This is probably more than you want to read, but there's a very good description of the JNDI options here:

  http://java.sun.com/products/jndi/tutorial/beyond/env/source.html

The path to the file is:

  $JAVA_HOME/lib/jndi.properties


Good Luck,
Kent


0

Featured Post

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question