Solved

DriverManagerDataSource in java spring?

Posted on 2013-10-29
1
965 Views
Last Modified: 2013-11-29
Hi,

Is there a property to designate the database schema name in the datasource config file?
Is it possible to name the schema  namehere in the datasource config file?
Right now ,the schema name is in the sql itself:

String sql="select * from schema_name.table_name";

Open in new window

<bean id="dataSource"
		class="org.springframework.jdbc.datasource.DriverManagerDataSource">
		<property name="driverClassName" value="${db2.jdbc.driverClassName}" />
		<property name="url" value="${db2.jdbc.url}" />
		<property name="username" value="${db2.jdbc.username}" />
		<property name="password" value="${db2.jdbc.password}" />
	</bean>

Open in new window

0
Comment
Question by:dkim18
[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
1 Comment
 

Accepted Solution

by:
dkim18 earned 0 total points
ID: 39609405
I think I found it.

currentSchema=
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.

729 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