这是用来做什么的?没涉及过,
//我在tomcat5中创建了一个JDBC连接的数据源jdbc/test
不好意思,怎么创建的?
//我在tomcat5中创建了一个JDBC连接的数据源jdbc/test
不好意思,怎么创建的?
解决方案 »
- findByProperty hibernate 急急急
- org.hibernate.TransactionException: Transaction not successfully started
- hibernate3 奇怪的转换问题
- oracle 语法问题 如何update一个表中的一行数据的一个字段,为另一个表中一个列中的所有数的总和
- 初学者请帮忙指点一二
- 如何让返回EJB的执行过程?
- jbuilder2005中ant应用的问题
- 请教一个简单的问题,走过路过进来帮帮忙!!
- java里的什么数据类型可以传到SQLServer数据库里进行时间比较?
- IDEA设置maven导致项目pom文件爆红
- 关于JTA和weblogic的事务处理问题,拜托大家帮忙
- 现在Resin都用什么版本,如何使用,我市菜鸟
是指放在tomcat里面的网页jsp和servlet?
tomcat或者其它服务器的连接池,你怎么能在其他地方使用呢?
他的连接池实现是以来这个容器的,以来容器的很多jar实现,所以离开这个环境你是不可能初始化上下文环境的
String user = null;
String password = null;
Properties properties = null;
try {
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, url);
if (user != null) {
properties.put(Context.SECURITY_PRINCIPAL, user);
properties.put(Context.SECURITY_CREDENTIALS, password == null ? "" : password);
}
return new InitialContext(properties);
}
catch (Exception e) {
throw e;
}