This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes setting currentSchema for DB2 during runtime? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "setting currentSchema for DB2 during runtime?" Watch "setting currentSchema for DB2 during runtime?" New topic
Author

setting currentSchema for DB2 during runtime?

subbukumararaja chandrasekaran
Greenhorn

Joined: Sep 24, 2010
Posts: 17
Hi
I am using the JDBC connection pooling for my application.
My resource definition in context.xml is as below;
<Resource name="myJDBC" auth="Container" type="javax.sql.DataSource"
maxActive="30"
maxIdle="30"
maxWait="10000"
username="User_Name" password="passWord"
driverClassName="com.ibm.db2.jcc.DB2Driver"
url="jdbc:db2://localhost:2552/myDB:currentSchema=mySchema;"/>

In this one, i want to set the currentSchema from the code. Could somebody tell me how to set the currentSchema value during runtime?

Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: setting currentSchema for DB2 during runtime?
 
Similar Threads
tomcat Vs glashfish doubt
Windows Environment Variable
tomcat Vs glashfish doubt
currentSchema issue in Tomcat6.0
Abandoned connections stack trace log