Duran's technical life
          踏踏實實學技術,認認真真做研究。

          2005年9月9日

          從MySql5中運行本地腳本創建數據庫,當插入中文字段時發生“data too long for column”錯誤。上網一查,發現多字節用戶大都碰到了這種情況。google搜索網上的解決方法大都是要將數據庫的編碼方式為GBK或UTF8,可我在安裝MySql時就選擇了UTF8格式。原來錯誤原因是本地的腳本文件不是UTF8編碼的,用記事本或UltraEdit將編碼轉為UTF8后問題解決。再次強調,JSP頁面,數據庫聯接接方式,數據庫創建,…,都須一致使用UTF8編碼!

          BTW,MySql最近借著Web2.0的浪潮風頭很勁啊,techn orati(好像這幾天被GFW filter了),flickr,del.icio.us等一批網站都是用了MySql。MySql還專門在首頁開了一大塊來炫耀。
          posted @ 2006-07-14 19:12 Duran's technical life 閱讀(9191) | 評論 (4)編輯 收藏
           
          Installed JDK6 (Mustang) beta and Eclipse3.2 . As Sun promised , Swing library, especially the?WindowsLookAndFeel feels much better. It’s hard to tell the difference between a Swing drawn window and a WINXP native window. Developing Java desktop applications is worth considering. Mattise, a free easy-to-use WYSIWYG Swing UI designer, is the only reason for many to use the tedious NetBeans. Recently, Genuitec provided Matisse4Eclipse, which is?an implementation of Matisse that integrates its functionality into MyEclipse Workbench to enable the easy creation of Swing applications with Eclipse. So the only reason to use NetBeans has gone.
          posted @ 2006-07-13 22:17 Duran's technical life 閱讀(1044) | 評論 (0)編輯 收藏
           
          去年7月決定考研后暫停了對Java技術的學習。錄研上后專心開發導師負責的項目,到4月份從深圳出差回來后又忙著做畢設。快一年的時間沒跟新這,幾乎都要abandon了。百度剛開放了百度空間的注冊,不過看起來不咋的。選國外的BSP會面臨隨時偉大的GFW過濾掉的后果。總的來說,BlogJava還是很適合post技術方面的東西,優點是流量大,被google收錄快;缺點就是沒有trackback。前幾天下午跑到圖書館看了看上半年的程序員,新鮮玩意并不多。SOA,這個被預測為06年最熱點的技術,并沒有什么有趣的文章,或許這個名詞還是沒有個明確的含義和應用。在學校里,IBM的SOA大賽倒是舉辦的風風火火。JavaEE5,JDK 6的發布還是給Java界帶來不少有趣又實用的新東東,比如annotation,persistence API和script supporting。得跟上技術前進的步伐了,以后技術的筆記還是發這里,平日的雜想就寫在我的MSN space上。
          posted @ 2006-07-13 22:14 Duran's technical life 閱讀(333) | 評論 (0)編輯 收藏
           

          @title [筆記]事務處理

          #1 Transaction Propagation Behavior
          Required:Excute within a current tx, create a new one if none exists.
          Supports: Excute within a current tx, execute without a tx if none exsits.
          Mandatory: Excute within a current tx, throw an exception if none exists.
          Requires New: Create a new tx and excute within the tx, suspend the current tx if one exists.
          Not Supported: Excute without a tx, suspend the current tx if none exsits.
          Never: Excute without a tx, throw an exception if a tx exsits.

          #2 Transaction Isolation Level[1]
          #2.1 Concurrent Problem
          Dirty Reads: 臟讀(臟數據指已更新,還沒提交的數據)。事務T1讀取到事務T2中的臟數據。

          Unrepeatable Reads: 不可重復讀。事務T1檢索到某行后,事務T2更新并提交了該行,若事務T2再次檢索該行,則會看到不一樣的結果。

          Phantom Reads: 虛讀。事務T1檢索到符合某條件的行集后,事務T2插入并提交了滿足該條件的新行,若事務T2再次按該條件檢索,則會看到以前不存在的行“Phantom”。

          #2.2 Isolation Level
          +---------------+-------+------------------+-----------+
          |Isolation Level|Phantom|Unrepeatable Reads|Dirty Reads|
          +---------------+-------+------------------+-----------+
          |Read Uncommited|   Y   |         Y        |     Y     |
          +---------------+-------+------------------+-----------+
          |Read Commited  |   Y   |         Y        |     N     |
          +---------------+-------+------------------+-----------+
          |Repeatable Read|   Y   |         N        |     N     |
          +---------------+-------+------------------+-----------+
          |Serializable   |   N   |         N        |     N     |
          +---------------+-------+------------------+-----------+

          #3 Timeout

          #4 ReadOnly Transaction
          只讀事務保證了多條查詢SQL的在事務級別的讀一致性。JDBC和數據庫會對只讀事務做一些優化。

          [1] C.J.Date, An Introduction to Database Systems 7th.

          posted @ 2005-09-09 13:09 Duran's technical life 閱讀(722) | 評論 (1)編輯 收藏
           
          主站蜘蛛池模板: 甘洛县| 高台县| 旬阳县| 偏关县| 晋州市| 桓台县| 南郑县| 绥滨县| 全州县| 岐山县| 闻喜县| 涟水县| 冷水江市| 资中县| 阆中市| 色达县| 翁源县| 筠连县| 寻乌县| 广西| 剑川县| 孟州市| 虎林市| 泸西县| 海宁市| 新津县| 景东| 兖州市| 叶城县| 双柏县| 高邑县| 黄梅县| 利津县| 万载县| 盐边县| 郓城县| 新化县| 舞阳县| 会昌县| 余姚市| 大宁县|