Solved

DriverManagerDataSource in java spring?

Posted on 2013-10-29
1
920 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
1 Comment
 

Accepted Solution

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

currentSchema=
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Understanding websocket example in spring 1 54
Systems talking to each other 5 123
Requested array size exceeds VM limit 3 82
backtracking recursion  code 19 53
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…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

948 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

19 Experts available now in Live!

Get 1:1 Help Now