VendorDataSource vds = new VendorDataSource();//这个是什么类?在java api中找不到这个类啊,求指点,需要还下载包吗?
vds.setSerVerName("localhost");
vds.setDatabaseName("wrox");
vdsDataSource.setDescription("example test database");//这个是什么?Context ctx = new InitialContext();ctx.bind("jdbc/wroxDB",vds);//这个什么?DataSource ds=(DataSource)ctx.lookup("jdbc/wroxDB");//获取的数据源相当于一个连接池吗?Connection cConn=dsDataSource.getConnection("username","password");
求大侠指教!
vds.setSerVerName("localhost");
vds.setDatabaseName("wrox");
vdsDataSource.setDescription("example test database");//这个是什么?Context ctx = new InitialContext();ctx.bind("jdbc/wroxDB",vds);//这个什么?DataSource ds=(DataSource)ctx.lookup("jdbc/wroxDB");//获取的数据源相当于一个连接池吗?Connection cConn=dsDataSource.getConnection("username","password");
求大侠指教!
这段代码从哪来的
Thank you!