<2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          統計

          • 隨筆 - 3
          • 文章 - 1
          • 評論 - 0
          • 引用 - 0

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          2011年9月7日

          trigger

          create or replace trigger pm4h_hw_db.t_get_sys_bhstore
            after insert on pm4h_ad.sys_bhstore
          declare
            pragma autonomous_transaction;
            tablename varchar2(64);
            cursor cr is
              select bhtable from pm4h_ad.sys_bhstore where bhmodelid = 'TODBH';
          begin
            open cr;
            fetch cr
              into tablename;
            while cr%found loop
              if fun_is_exists_table(tablename) = 0 then
                pm4h_hw_db.create_bh_table(tablename);
              end if;
              fetch cr
                into tablename;
            end loop;
            close cr;
          end pm4h_hw_db.t_get_sys_bhstore;

          posted @ 2011-09-07 16:45 陳碧滔 閱讀(118) | 評論 (0)編輯 收藏

          2011年9月6日

          不使用spring讀取ApplicationContet.xml文件中數據庫配置

          在web應用沒有啟用之前我們需要對數據庫進行操作,此事spring沒有加載完成,我們依然可以使用jdbc對數據庫進行操作。
          實現方法如下
          配置一個struts監聽器,
          實現ServletContextListener接口
          public class HuaweiDBListener implements ServletContextListener {

          }
          實現接口中方法
          public void contextInitialized(ServletContextEvent context) {
              String serverPath = context.getServletContext().getRealPath("/"); 
              ApplicationContext appC= new FileSystemXmlApplicationContext(serverPath + "WEB-INF\\spring\\applicationContext.xml"); 
              ComboPooledDataSource c = (ComboPooledDataSource) appC.getBean("dataSource"); 
              System.out.println("DriverClass=="+ c.getDriverClass());
          }


          使用ComboPooledDataSource對象直接從ApplicationContet.xml中得到數據源配置。

          posted @ 2011-09-06 22:00 陳碧滔 閱讀(289) | 評論 (0)編輯 收藏
          開始寫bolg

          今天開始寫bolg,慢慢記錄自己技術上的成長~~~

          posted @ 2011-09-06 21:53 陳碧滔 閱讀(115) | 評論 (0)編輯 收藏
          僅列出標題  
          主站蜘蛛池模板: 莆田市| 长汀县| 高雄县| 平定县| 泊头市| 城固县| 石城县| 绥德县| 双江| 多伦县| 滨海县| 天台县| 阿坝县| 天等县| 平顶山市| 澜沧| 德格县| 保山市| 烟台市| 新巴尔虎右旗| 普格县| 贵溪市| 图木舒克市| 厦门市| 普安县| 凤城市| 京山县| 北川| 婺源县| 灵台县| 寿光市| 大关县| 无锡市| 商丘市| 大港区| 杭州市| 舞阳县| 博罗县| 丹凤县| 马边| 循化|