VAJ3.5. I use the following codes to retrieve the jdbcURL. But it doesn't work. The return value of url is always "null". Help!

howru (How are you?)
VAJ3.5. I use the following codes to retrieve the jdbcURL. But it doesn't work. The return value of url is always "null".

Connection getConnection() throws SQLException{
Properties props = context.getEnvironment(); //context is defined in beanclass as: EntityContext context = null
String url = props.getProperty("jdbcURL");
return DriverManager.getConnection(url);
// if I define url explicitly as: String url = "jdbc:db2:sample"; work well!
}
(#33268@0)
2001-3-14 -05:00

回到话题: VAJ3.5. I use the following codes to retrieve the jdbcURL. But it doesn't work. The return value of url is always "null". Help!

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论

URL:   
http://www.rolia.net/zh/post.php?f=0&p=33268