<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)編輯 收藏
          僅列出標題  
          主站蜘蛛池模板: 土默特右旗| 怀安县| 泾源县| 平山县| 龙州县| 鄄城县| 武定县| 玉田县| 连云港市| 尼木县| 墨竹工卡县| 尼玛县| 阿瓦提县| 玛纳斯县| 留坝县| 灵川县| 钟祥市| 石台县| 泰兴市| 庆阳市| 平武县| 舒城县| 张掖市| 栖霞市| 桃园市| 礼泉县| 烟台市| 青海省| 岑巩县| 长治市| 西华县| 亚东县| 兴城市| 松阳县| 盐亭县| 邵东县| 乡城县| 旺苍县| 平舆县| 保靖县| 广饶县|