Solved

Configuring JNDI on Websphere for DB2

Posted on 2009-05-18
6
2,462 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
  • 2
  • 2
6 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 168 total points
Comment Utility
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:Kdo
Kdo earned 332 total points
Comment Utility
Hi cuttie,

In database.properties, just set the schema name:

  DB2DAOFactory.database.schema.name=schemaABC



Kent
0
 

Author Comment

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

Author Comment

by:cuttieveenz
Comment Utility
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:Kdo
Kdo earned 332 total points
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
zeroFront challenge 7 70
Problem to setup 18 78
sumHeights2  challenge 7 75
ArrayIndexOutOfBoundException 9 29
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
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…
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now