??xml version="1.0" encoding="utf-8" standalone="yes"?>BlogJava-robbiehttp://www.fpcwrs.live/robbie/zh-cnSun, 25 Aug 2019 23:21:05 GMTSun, 25 Aug 2019 23:21:05 GMT60jquery mobile content 高度讄http://www.fpcwrs.live/robbie/archive/2013/01/28/394828.htmlThe MatrixThe MatrixMon, 28 Jan 2013 02:59:00 GMThttp://www.fpcwrs.live/robbie/archive/2013/01/28/394828.htmlhttp://www.fpcwrs.live/robbie/comments/394828.htmlhttp://www.fpcwrs.live/robbie/archive/2013/01/28/394828.html#Feedback1http://www.fpcwrs.live/robbie/comments/commentRss/394828.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/394828.htmlvar fixgeometry = function() {
    /* Some orientation changes leave the scroll position at something
     * that isn't 0,0. This is annoying for user experience. */
    scroll(0, 0);
    /* Calculate the geometry that our content area should take */
    var header = $(".header:visible");
    var footer = $(".footer:visible");
    var content = $(".content:visible");
    var viewport_height = $(window).height();
    
    var content_height = viewport_height - header.outerHeight() - footer.outerHeight();
    
    /* Trim margin/border/padding height */
    content_height -= (content.outerHeight() - content.height());
    content.height(content_height);
  }; /* fixgeometry */
  $(document).ready(function() {
    $(window).bind("orientationchange resize pageshow", fixgeometry);
  });


The Matrix 2013-01-28 10:59 发表评论
]]>
关于Hibernate分页、Fetch Join调优的一好文章http://www.fpcwrs.live/robbie/archive/2012/05/14/378095.htmlThe MatrixThe MatrixMon, 14 May 2012 06:28:00 GMThttp://www.fpcwrs.live/robbie/archive/2012/05/14/378095.htmlhttp://www.fpcwrs.live/robbie/comments/378095.htmlhttp://www.fpcwrs.live/robbie/archive/2012/05/14/378095.html#Feedback0http://www.fpcwrs.live/robbie/comments/commentRss/378095.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/378095.htmlhttp://java.dzone.com/articles/hibernate-tuning-queries-using?page=0,0 

The Matrix 2012-05-14 14:28 发表评论
]]>
Centos6.2安装Magentohttp://www.fpcwrs.live/robbie/archive/2012/04/04/373322.htmlThe MatrixThe MatrixWed, 04 Apr 2012 09:09:00 GMThttp://www.fpcwrs.live/robbie/archive/2012/04/04/373322.htmlhttp://www.fpcwrs.live/robbie/comments/373322.htmlhttp://www.fpcwrs.live/robbie/archive/2012/04/04/373322.html#Feedback1http://www.fpcwrs.live/robbie/comments/commentRss/373322.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/373322.html环境Q?/strong>
    
    Centos6.2(安装在Vmware7.0?
    Magento1.6.2
    Apache Httpd Server 2.2.15
    MySql 5.1.61
    PHP5.3.3

安装q程Q?/strong>

    apache http、mysql、php及相x展安装:
    其中apache http、Mysql、php都是利用centos的添?删除软g功能q行安装。同时用该功能安装"php-xml"?php-gd"?php-pdo"?php-mbstring"?php-mysql"扩展?/div>
    使用chkconfig配置httpd和mysql为系l服务。命令如下:
    chkconfig httpd on
    chkconfig -add mysqld
    chkconfig mysqld on
    使用chkconfig --list 可以查看所有的服务配置状?/div>
    使用service httpd start、service mysqld start启动httpd和mysqld服务。可以通过service httpd restart重启相关服务?/div>
    此时讉K本机的http://localhost可以看到apache的欢q界面,同时~辑index.php文gQ其内容如下Q?/div>
    <?php
        phpinfo();
    ?>
    q将该文件置?var/www/html目录下,讉Khttp://localhost/index.phpQ此时应该不能看到php版本信息Q仅能看到index.php的静态文本内宏V?/div>
    修改/etc/httpd/conf/httpd.conf文gQ修改如下:
    DirectoryIndex index.html index.html.var ->  DirectoryIndex index.html index.htm index.php
    增加Q?/div>
    AddType application/x-httpd-php .php
    AddDefaultCharset -> AddDefaultCharset off  (解决中文q问题)
    增加一DVirtualHost描述Q如下(在配|文件的最后)Q?/div>
    <VirtualHost *:80>
        DocumentRoot /var/www/smallfive
        ServerName smallfive
        ServerAlias smallfive.com *.smallfive.com
    </VirtualHost>
    此时讉Khttp://localhost/index.phpQ应该一切正?br />
    讄数据库:
    使用mysqladmin -u root password 'newpassword'讄mysql数据库的默认密码
    让数据库更安全:
    mysql -u root -p    q入mysql
    mysql> DROP DATABASE test;                删除test数据?/div>
    mysql> DELETE FROM mysql.user WHERE user = '';       删除匿名帐户
    mysql> FLUSH PRIVILEGES;                 重蝲权限
    创徏magento数据?/div>
    mysql> CR   讉Kmagento数据库,保一切正?/div>

    配置MagentoQ?/strong>
    解压~magento1.6.2版本?var/www/smallfive/magento目录
    解压命oQ?/div>
   EATE DATABASE magento;
    mysql> GRANT ALL PRIVILEGES ON magento.* TO 'root'@'localhost' IDENTIFIED BY 'newpassword'; 
  tar zxvf magento1.6.2.tar.gz
    此时讉Khttp://localhost/magentoQ可Ҏmagento的设|进行配|?br />
   
    注意如下问题Q?/strong>
    1、确保当前用h有对/var/www/smallfive/magento可读可写权限
    2、还需安装mcrypt库,安装q个库比较繁琐,mcrypt依赖于Libmcrypt库和mhash库,我们需要下载Libmcrypt库和mhash库安装它们,然后再编译Mcrypt?/div>
    在编译之前,先做好如下准备工作:
        a、安装phpizeQyum -y install php-devel
        b、安装C++脚本~译模块Q?/div>
            yum -y install gcc gcc-g++
            yum -y install gcc gcc-c++
    安装mcrypt库过E,如下Q?/div>
        a、下载libmcrypt和mhash?/div>
            LibmcryptQhttp://sourceforge.net/project/showfiles.php?group_id=87941&package_id=91774&release_id=487459
            mhashQhttp://sourceforge.net/project/showfiles.php?group_id=4286&package_id=4300&release_id=645636
        b、将上述两个下蝲后,分别解压Qƈ执行如下命o~译Q?/div>
            ./configure
            make && make install
        c、下载php对应的源代码Q解压,
            q入php源代码的 /ext/mcrypt目录
            执行phpize命o
            ./configure –with-php-config=/usr/bin/php-config
            make && make install
        d、在php.ini文g中增加如下内容:
            extension=/usr/lib/php/modules/mcrypt.so
            mcrypt.so文g路径在php-config文g中可以找?/div>
        e、service httpd restart
   
    end!
     
    参考文章:
    http://www.eexu.com/article.asp?id=1730
    http://www.ruiwant.com/centos-6-0%E4%B8%8Bmagento%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE%E6%80%BB%E7%BB%93.html
    http://zixun.www.net.cn/qita/2344.html
    http://os.qudong.com/Linux/2010/0210/64441.html


The Matrix 2012-04-04 17:09 发表评论
]]>VmWare虚拟机时间与L不同步的讄http://www.fpcwrs.live/robbie/archive/2012/03/02/371116.htmlThe MatrixThe MatrixFri, 02 Mar 2012 02:51:00 GMThttp://www.fpcwrs.live/robbie/archive/2012/03/02/371116.htmlhttp://www.fpcwrs.live/robbie/comments/371116.htmlhttp://www.fpcwrs.live/robbie/archive/2012/03/02/371116.html#Feedback0http://www.fpcwrs.live/robbie/comments/commentRss/371116.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/371116.html有时在vmware里面安装的系l或应用有License旉的限Ӟ可以通过修改虚拟机时间的Ҏ来防止过期,此时需?vmx文g中加入下面的内容Q?/span>
tools.syncTime = "FALSE"
time.synchronize.continue = "FALSE"
time.synchronize.restore = "FALSE"
time.synchronize.resume.disk = "FALSE"
time.synchronize.shrink = "FALSE"
rtc.startTime = 1183431600  #q是用来指定虚拟机启动后的时间。数字是?970q??日零旉分零U以来的U数Q可以通过如下|址某个时间{换ؓ该数字(Unix旉戻IQ?/span>http://www.onlineconversion.com/unix_time.htm

注意Q同时还需在虚拟机操作pȝ的服务中Q停?#8220;VMware Tools Service”的服务?br />在Windows Server 2003中操作系l自w也有时间同步功能,需在时间设定中停用Q同时停?#8220;Windows Timer”服务?/span>


The Matrix 2012-03-02 10:51 发表评论
]]>安装Apache HTTP Server + PHP + WordPresshttp://www.fpcwrs.live/robbie/archive/2011/11/27/364937.htmlThe MatrixThe MatrixSun, 27 Nov 2011 13:28:00 GMThttp://www.fpcwrs.live/robbie/archive/2011/11/27/364937.htmlhttp://www.fpcwrs.live/robbie/comments/364937.htmlhttp://www.fpcwrs.live/robbie/archive/2011/11/27/364937.html#Feedback0http://www.fpcwrs.live/robbie/comments/commentRss/364937.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/364937.htmlhttp://blog.chenlb.com/2011/03/install-apache-php-wordpress-windows.html

在安装好apache http server后,如果端口不正,则修?apache安装目录/conf/httpd.conf"文g中的如下信息Q?br />
Listen 80  -> Listen 8060
#ServerName localhost:80 -> ServerName localhost:8060

Apache HTTP Server版本Q?.2
PHP版本Q?.3.8
WordPress版本Q?.2.1


The Matrix 2011-11-27 21:28 发表评论
]]>
Oracle数据导入指定表空?/title><link>http://www.fpcwrs.live/robbie/archive/2011/05/31/351446.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Tue, 31 May 2011 08:43:00 GMT</pubDate><guid>http://www.fpcwrs.live/robbie/archive/2011/05/31/351446.html</guid><wfw:comment>http://www.fpcwrs.live/robbie/comments/351446.html</wfw:comment><comments>http://www.fpcwrs.live/robbie/archive/2011/05/31/351446.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.fpcwrs.live/robbie/comments/commentRss/351446.html</wfw:commentRss><trackback:ping>http://www.fpcwrs.live/robbie/services/trackbacks/351446.html</trackback:ping><description><![CDATA[<div><span style="color: #333333; font-family: Arial; line-height: 20px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><p style="line-height: normal; ">1. 打开工具Oracle SQL Plus 以dbaw䆾dsys用户<br style="line-height: normal; " />sqlplus /nolog<br />conn sys@url as sysdba<br /><br />2. 创徏用户q指定表I间<br style="line-height: normal; " /><br />使用客户端工h者Web理控制台创I间以及用户<br style="line-height: normal; " />l用戯予connect、resource、dba权限<br style="line-height: normal; " />grant connect,resource,dba to username;<br /></p><div><div><br />注意Q给oracle用户分配connect、resource角色Ӟ此时connect 角色中有一?UNLIMITED TABLESPACE 权限Q也是usernameq个用户可以在其他表I间里随意徏表?/div><div></div></div>revoke unlimited tablespce from username;     --撤销username用户在Q意表I间的权?br />alter user username quota 0 on users;      --alter username quota 0 on Users;  // q不是很清楚具体含义Q?Q?br />alter user username quota unlimited on tablespacename;   --赋予username用户在tablespacename表空间Q意徏表的权限;<p> </p><p style="line-height: normal; "><br style="line-height: normal; " />3. 使用imp工具导入dmp数据文g<br style="line-height: normal; " />imp username<a href="mailto:jandardb/jandardb@orcl" style="line-height: normal; ">/password@</a>url file=c:\db.dmp fromuser=username1 touser=username log=c:\log.txt<br /><br /><br />-------------------------------------------------------------------------------------------------------------<br />其它命oQ?br />select * from dba_users;    --查询用户<br /></p><div>select * from dba_tables;    --查询?/div>select * from dba_views;    --查询视图<br />select * from dba_tablespaces;    --查询表空?br /><br /><br />oracle 10gQ查询表I间使用?br /><div>Select * from sys.DBA_TABLESPACE_USAGE_METRICS;<br /></div></span><span class="Apple-style-span" style="color: #333333; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "><font class="Apple-style-span" face="Arial">-------------------------------------------------------------------------------------------------------------</font><br /><br /></span><font class="Apple-style-span" face="Arial, Helvetica, sans-serif"><span class="Apple-style-span" style="font-size: 12px;"></span></font><span class="Apple-style-span" style="color: #333333; font-family: Arial; line-height: 20px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">drop user username cascade;<br /><br />ORA-01940:无法删除当前已连接的用户<br /><br /></span><span style="color: #333333; font-family: Arial; line-height: 20px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">select username, sid, serial# from v$session where username='username';<br /><br /><div>alter system kill session'sid,serial#'</div><p> </p></span></div><img src ="http://www.fpcwrs.live/robbie/aggbug/351446.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.fpcwrs.live/robbie/" target="_blank">The Matrix</a> 2011-05-31 16:43 <a href="http://www.fpcwrs.live/robbie/archive/2011/05/31/351446.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>安装Redmine1.1.3q程QWindows 7 Professional环境Q?/title><link>http://www.fpcwrs.live/robbie/archive/2011/05/20/350665.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Fri, 20 May 2011 02:25:00 GMT</pubDate><guid>http://www.fpcwrs.live/robbie/archive/2011/05/20/350665.html</guid><wfw:comment>http://www.fpcwrs.live/robbie/comments/350665.html</wfw:comment><comments>http://www.fpcwrs.live/robbie/archive/2011/05/20/350665.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.fpcwrs.live/robbie/comments/commentRss/350665.html</wfw:commentRss><trackback:ping>http://www.fpcwrs.live/robbie/services/trackbacks/350665.html</trackback:ping><description><![CDATA[<div>环境QWindows7 professional<br /> <br /> 1、下载redmine1.1.3.zip、ruby1.8.7、rubygems-1.3.7.zip、mysql 5.0<br /> <br /> 2、安装MySQL5.0QcmdH口下用mysql -u root -p dMySQL数据库,执行如下语句创徏redmine数据库及用户Q?br /> create database redmine character set utf8;<br /> create user 'redmine'@'localhost' identified by 'my_password';<br /> grant all privileges on redmine.* to 'redmine'@'localhost';<br /> 注:<br />     使用MySQL5.5在后面进行初始数据时Ruby会提C接有问题<br />     在安装完MySQL后,先不要进行配|,?#8220;MySQL安装路径\bin”目录下,修改MySQLInstanceConfig.exe?#8220;以管理员成分执行此程?#8221;Q?#8220;以兼Ҏ式运行该E序”<br />     q行数据库配|时Q选择字符集ؓutf8<br /> <br /> 3、运行ruby1.8.7安装包,解压至d:/ruby187Q将d:/ruby187/bind至path环境变量?br /> 安装后可执行 ruby -v查看ruby版本以检验安装是否正?br /> <br /> 4、解压rubygems-1.3.7.zip至d:/rubygems-1.3.7<br /> q入d:/rubygems-1.3.7目录Q执行ruby setup.rb<br /> 注:Redmine需要rubygems 1.3.1 - 1.5.xQ肯定不能用1.8.2版本<br /> <br /> 5、执行gem install rails -v=2.3.5 q程安装rails2.3.5版本<br /> gem install mysql <br /> gem install -v=0.4.2 i18n<br /> <br /> 6、解压羃redmine1.1.3至d:/redmine1.1.3目录<br /> q入d:/redmine-1.1.3/config目录Q修改database.yml.example文g为database.ymlQƈ修改该文件中的production数据库连接配|ؓ如下Q?br /> production:<br />   adapter: mysql<br />   database: redmine<br />   host: localhost<br />   username: redmine<br />   password: my_password<br />   encoding: utf8<br /> <br /> q入d:/redmine1.1.3目录Q执?br /> rake config/initializers/session_store.rb<br /> rake db:migrate RAILS_ENV="production" <br /> <br /> 7、加载默认配|数?br /> rake redmine:load_default_data RAILS_ENV="production" <br /> 默认语言选择"zh"<br /> <br /> 8、运?br /> ruby script/server webrick -e production<br /> <br /> 9、访问:http://localhost:3000<br /> 使用admin/adminq行d<br /> q入讄Q把默认语言设ؓ“体中?#8221;Q然后设|当前用L默认语言设ؓ“体中?#8221;Q这样就是中文界面了<br /><br />-----------------------------------------<br /><br />l箋Q将redmine讄为windows 7的服?br /><br />1、首先需要配|mysql为windows 7的服?br /><br />2、Ruby提供一个安装RubyE序为服务的包:mongrel_service。安装其实很单,q行Qgem install mongrel_service<br /><br />3、安装redmine为服务,执行mongrel_rails service::install -N RedMine -c C:\redmine-1.1.3 -p 3000 –e production<br />注意Q此处打开cmdH口Ӟ需要输入cmd后,不是直接按EnterQ而是?Ctrl+Shift+Enter打开CmdH口Q此时以理员n份打开Q否则安装ؓ服务时会提示拒绝讉K?br /><br />4、安装服务后Q需查服?e后的参数是不是productionQ如果不是production而是developmentQ则在注册表中把参数手动改ؓproduction。修Ҏ法是Q打开“注册表编辑器”Q展开分支“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services”Q选择redmine服务Q找到ImagePath,修改保存后在服务列表中启动服务,q把服务讄自动启动?br /><br />OKQ?/div><img src ="http://www.fpcwrs.live/robbie/aggbug/350665.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.fpcwrs.live/robbie/" target="_blank">The Matrix</a> 2011-05-20 10:25 <a href="http://www.fpcwrs.live/robbie/archive/2011/05/20/350665.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Unity3D中创Z个带背景?D物体http://www.fpcwrs.live/robbie/archive/2011/03/25/347039.htmlThe MatrixThe MatrixFri, 25 Mar 2011 13:33:00 GMThttp://www.fpcwrs.live/robbie/archive/2011/03/25/347039.htmlhttp://www.fpcwrs.live/robbie/comments/347039.htmlhttp://www.fpcwrs.live/robbie/archive/2011/03/25/347039.html#Feedback0http://www.fpcwrs.live/robbie/comments/commentRss/347039.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/347039.htmlhttp://www.41post.com/3255/programming/unity3d-creating-a-gui-with-both-3d-and-2d-elements


The Matrix 2011-03-25 21:33 发表评论
]]>cM于Google Calendar的好东东http://www.fpcwrs.live/robbie/archive/2010/11/09/337663.htmlThe MatrixThe MatrixTue, 09 Nov 2010 12:37:00 GMThttp://www.fpcwrs.live/robbie/archive/2010/11/09/337663.htmlhttp://www.fpcwrs.live/robbie/comments/337663.htmlhttp://www.fpcwrs.live/robbie/archive/2010/11/09/337663.html#Feedback0http://www.fpcwrs.live/robbie/comments/commentRss/337663.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/337663.htmlhttp://arshaw.com/fullcalendar/

q个博客中另有几个推荐的cM目Q?a href="http://hi.baidu.com/freezesoul/blog/item/15c5d73fe4a315c17d1e71ec.html">http://hi.baidu.com/freezesoul/blog/item/15c5d73fe4a315c17d1e71ec.html

The Matrix 2010-11-09 20:37 发表评论
]]>
《谁在谋杀中国l济》与E序?/title><link>http://www.fpcwrs.live/robbie/archive/2010/04/14/318370.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Wed, 14 Apr 2010 14:05:00 GMT</pubDate><guid>http://www.fpcwrs.live/robbie/archive/2010/04/14/318370.html</guid><wfw:comment>http://www.fpcwrs.live/robbie/comments/318370.html</wfw:comment><comments>http://www.fpcwrs.live/robbie/archive/2010/04/14/318370.html#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://www.fpcwrs.live/robbie/comments/commentRss/318370.html</wfw:commentRss><trackback:ping>http://www.fpcwrs.live/robbie/services/trackbacks/318370.html</trackback:ping><description><![CDATA[<p>q几天在看郎咸^的《谁在谋杀中国l济》,q本书我基本看过一遍了Q认为全书的重点在于中华文化的四大茫Ӟ整本书都是围l这四大茫然展开Q中华文化的四大茫然如下Q?br>茫然之一Q就知道赚钱<br>茫然之二Q不了解世界<br>茫然之三Q不了解别hZ么那么看?br>茫然之四Q不了解自己的缺?/p> <p>大家有时间可以看看这本书Q我觉得写的不错Q至我自己看完深有感触Q我觉得完全可以这几点套用到我们生zȝ很多斚wQ比如对于我们搞IT的技术h员来_我认为现在很多h也存在四大茫Ӟ</p> <p>茫然之一Q只知道完成d。也许是我年龄大了点Q但我觉得现在很多小朋友Q尤其是85q以后出生的Q工作的时候只是在完成dQ事情做完了Q有时也不测试,或者就是匆匆测试,匆匆l束Qƈ没有好好的想Z么这件事老大要让我这样做Q这样做有什么好处,会不会有~点Q我是不是有更好的方法。当你不L的时候,意味着你少了很多提高的Z?/p> <p>茫然之二Q不q究Z么。很多h做事情就象第一条说的那P只是完成dQƈ不去惛_中的原理是什么。面试过很多人,对于目前工作两三q的大部分h来说(当然我面试的不是好的学校毕业的,基本学校Z{偏下点)Q一旦涉及到Spring、Hibernate、Struts{框架深入点东西的时候,大都回答不上来,只是Ҏ架能熟练应用而已。这样够么?计算机的很多知识Q当你熟悉了其运作原理,框架对于你来_只是手到擒来Q看看学学就会用了。我问过好几个同事,qx晚上回去都干嘛,很多人都回答我晚上回ȝ看电视,E微看看书就睡觉了。我有点惊讶Q我惛_果你xZ个技术高手,一个能拉K薪的E序员,你又没有天䆾Q又不付q常人的努力Q凭什么你比别人强呢?</p> <p>茫然之三Q不善于ȝ。很多hQ又是很多hQ过着做一天和撞一天钟的日子,日子一天一天过去,基本不去ȝQ只是过了好长一D|间会发觉Q原来最q我啥也没有q步Q啥也没学到Q还是老样子。知识在于积累,你只有不断ȝQ知识才能更好的U篏Q才能更好的Z服务?/p> <p>茫然之四Q没有明的目标。一个h没有目标决定了他不会有长的进步。你都没有想q自p成ؓ一个架构师Q一个项目经理,一个部门经理,一个技术ȝQ都没有惌要成L人需要具备什么样的条Ӟ你怎么可能知道自己Ơ缺什么?需要补充什么呢Q长q目标要明确Q然后根据长q目标进行分析,我要辑ֈq样的目标,q有什么欠~,据此制定短期目标Q短期目标一定要可实现可操作。这样随着你目标的一步一步实玎ͼ你各斚w的能力也随之提高了?/p> <p>写了几点Q也作ؓ对自q鞭策?/p><img src ="http://www.fpcwrs.live/robbie/aggbug/318370.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.fpcwrs.live/robbie/" target="_blank">The Matrix</a> 2010-04-14 22:05 <a href="http://www.fpcwrs.live/robbie/archive/2010/04/14/318370.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>2010q读书计?/title><link>http://www.fpcwrs.live/robbie/archive/2010/02/03/311854.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Wed, 03 Feb 2010 15:27:00 GMT</pubDate><guid>http://www.fpcwrs.live/robbie/archive/2010/02/03/311854.html</guid><wfw:comment>http://www.fpcwrs.live/robbie/comments/311854.html</wfw:comment><comments>http://www.fpcwrs.live/robbie/archive/2010/02/03/311854.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.fpcwrs.live/robbie/comments/commentRss/311854.html</wfw:commentRss><trackback:ping>http://www.fpcwrs.live/robbie/services/trackbacks/311854.html</trackback:ping><description><![CDATA[<p>2010q已l过M个月了,赶在农历春节前列一下今q的M清单Q不能L_֊攑֜工作中了Q也需要补充点新知识了Q否则没有新东西能A献出来了?/p> <p>1、《OSGI原理与最佛_c,l合q本书ƈ研究SpringDMQ做一些实例?/p> <p>2、《SQL语言艺术?/p> <p><font color="#0000ff">3、《Oracle9i&10g~程艺术?/font></p> <p><font color="#0000ff">4、《架构之?/font></p> <p>5、《UML和模式应用?/p> <p>6、《UML彩色建模?/p> <p><font color="#0000ff">7、《领域驱动设计与模式实战?/font></p> <p><font color="#0000ff">8、《敏捯Y件开?原则、模式与实践?/font></p> <p>9、《Y件开发的边界?/p> <p>10、《Y仉惛_?/p> <p>11、《走Y件作坊?/p> <p>p么多了,9?0?1d都看q一遍了Q但好多地方_粗q了一下,q要仔细阅读?/p> <p>另外也对自己提个要求Q看书要做读书笔记?/p> <p>2010q?我的Mq_</p> <img src ="http://www.fpcwrs.live/robbie/aggbug/311854.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.fpcwrs.live/robbie/" target="_blank">The Matrix</a> 2010-02-03 23:27 <a href="http://www.fpcwrs.live/robbie/archive/2010/02/03/311854.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>寸土必争http://www.fpcwrs.live/robbie/archive/2010/01/05/308350.htmlThe MatrixThe MatrixTue, 05 Jan 2010 13:25:00 GMThttp://www.fpcwrs.live/robbie/archive/2010/01/05/308350.htmlhttp://www.fpcwrs.live/robbie/comments/308350.htmlhttp://www.fpcwrs.live/robbie/archive/2010/01/05/308350.html#Feedback11http://www.fpcwrs.live/robbie/comments/commentRss/308350.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/308350.html摘自《Y仉惛_?/p>

看了软g随想录中下面一D话Q觉得非常棒Q作Z名Y件从业h员,不一定有Z能实现描qC的优U软g产品Q但q样的理念需要诏I我们每个h的心甎ͼ时刻记在心中Q?/p>

【创造一个有使用价值的软gQ?font color="#ff0000">你必L时刻刻都在奋?/strong>Q每一ơ的修补Q每一个功能,每一处小的改进Q你都在奋斗Q目的只是ؓ了再多创造一点空_可以再多吸引一个用户加入。没有捷径可走。你需要一点运气,但是q不取决于你是否q运。你之所以会有好q气Q那是因Z寸土必争?/p>

每天你前q一步Q将一件东西做得比昨天好一点点。这L改进几乎看不出可以让谁获益,几乎没有变化。但是,你前q了一步?/p>

有无C要做的这样微的改进?/p>

Z发现可以改进的地斏V?strong>你必L一个思维定势Q始l如一的用批判的眼光看世界。随便找一样东西,如果你看不出它的~点Q那么你的思维转型q没有成功。当你成功的时候,你n边亲密的Z被你逼得发疯。你的家人恨不得杀了你。当你步行上班的时候,看到一个司机O不经心地开车,你几乎用了所有的意志力才勉强忍不住冲上去告诉那个司机Q他q样开车差点儿要了旁边坐在轮椅上的那个可怜小孩的命?/p>

当你Ҏ了一个又一个这L细节后Q当你磨光、定型、擦亮、修C的品的每一个小边角后,׃有神奇的事情发生。厘c_成分cI分米变成cIc_成了千米。你最后拿出来的是一件真正优U的品。它W一眼就让h觉得震撼Q出cL萃,工作h完全W合直觉。就?00万个用户中有一个用h天突然要用到一个他100万次使用中才会用Cơ的|见功能Q他发现了这个功能不仅能用,而且q很没:在你的Y件中Q即使是看门人的屋都铺着大理石的地板Q配有实心的木门和桃花心木的壁ѝ?/p>

是在这个时候,你意识到q是一个优U软g。?/p>

The Matrix 2010-01-05 21:25 发表评论
]]>
flex custom layout && easy flex skinninghttp://www.fpcwrs.live/robbie/archive/2009/11/25/303597.htmlThe MatrixThe MatrixWed, 25 Nov 2009 04:25:00 GMThttp://www.fpcwrs.live/robbie/archive/2009/11/25/303597.htmlhttp://www.fpcwrs.live/robbie/comments/303597.htmlhttp://www.fpcwrs.live/robbie/archive/2009/11/25/303597.html#Feedback0http://www.fpcwrs.live/robbie/comments/commentRss/303597.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/303597.htmlhttp://www.insideria.com/2009/05/flex-4-custom-layouts.html


http://www.insideria.com/2009/10/easy-flex-skinning-with-firewo.html



The Matrix 2009-11-25 12:25 发表评论
]]>
flex中如何用~程的方式实现Statehttp://www.fpcwrs.live/robbie/archive/2009/11/11/302020.htmlThe MatrixThe MatrixWed, 11 Nov 2009 13:59:00 GMThttp://www.fpcwrs.live/robbie/archive/2009/11/11/302020.htmlhttp://www.fpcwrs.live/robbie/comments/302020.htmlhttp://www.fpcwrs.live/robbie/archive/2009/11/11/302020.html#Feedback0http://www.fpcwrs.live/robbie/comments/commentRss/302020.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/302020.html在Flash Builder 4 Beta 2版本中,使用mxml方式实现state的切换有了很大改q,使用h更方便,具体可参见下文:

http://onflex.org/learn/fx4/index.php?page=States

看完q篇文章后,惛_一个问题,如何用编E的方式实现切换呢,找了参考资料,实现了一个例子,代码如下Q?/p>

开发环境:Flash Builder 4 Beta2

<?xml version="1.0" encoding="utf-8"?>
<s:Application
    
xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s
="library://ns.adobe.com/flex/spark"
    creationComplete
="creationCompleteHandler(event)">
    
<fx:Script>
        
<![CDATA[
            import mx.core.UIComponent;
            import mx.events.FlexEvent;
            import mx.states.SetProperty;
            import mx.states.State;
            
            import spark.components.Label;
            import spark.components.Panel;

            private var stateArray : Array;
            private var state1 : State;
            private var state2 : State;
            
            protected function creationCompleteHandler(event:FlexEvent):void
            {
                state1 = new State();
                state1.name="state1";
                
                state2 = new State();
                state2.name="state2";
                
                var stateArray1:Array = new Array();
                var stateArray2:Array = new Array();
                
                state1.overrides = stateArray1;
                state2.overrides = stateArray2;
                
                stateArray = new Array();
                stateArray.push(state1);
                stateArray.push(state2);
                this.states = stateArray;
                
                var panel:Panel = new Panel();
                group.addElement(panel);
                var label:Label = new Label();
                panel.addElement(label);
                
                buildStates(stateArray1, stateArray2, panel, label);
                this.currentState = "state1";
            }

            private function buildStates(stateArray1:Array, stateArray2:Array,
                compenent1:UIComponent, compenent2:UIComponent) : void{
                
                stateArray1.push(makeSetProp(compenent1, "title", "Panel1"));            
                stateArray1.push(makeSetProp(compenent2, "text", "One"));
                
                stateArray2.push(makeSetProp(compenent1, "title", "Panel2"));
                stateArray2.push(makeSetProp(compenent2, "text", "Two"));
            }
            
            private function makeSetProp(target:UIComponent, name:String, value:*):SetProperty{
                var sp:SetProperty = new SetProperty();
                sp.target = target;
                sp.name = name;
                sp.value = value;
                return sp;
            } 
        
]]>
    
</fx:Script>
        
    
<s:VGroup autoLayout="true" horizontalAlign="center">
        
<s:HGroup horizontalCenter="0">            
            
<s:Button label="One" 
                click
="this.currentState='state1'"/>            
            
<s:Button label="Two" 
                click
="this.currentState='state2'"/>            
        
</s:HGroup>
        
<s:HGroup id="group" horizontalCenter="0">            
        
</s:HGroup>
    
</s:VGroup>
    
</s:Application>


The Matrix 2009-11-11 21:59 发表评论
]]>
计算机知识体p?/title><link>http://www.fpcwrs.live/robbie/archive/2009/10/22/299270.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Thu, 22 Oct 2009 00:32:00 GMT</pubDate><guid>http://www.fpcwrs.live/robbie/archive/2009/10/22/299270.html</guid><wfw:comment>http://www.fpcwrs.live/robbie/comments/299270.html</wfw:comment><comments>http://www.fpcwrs.live/robbie/archive/2009/10/22/299270.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.fpcwrs.live/robbie/comments/commentRss/299270.html</wfw:commentRss><trackback:ping>http://www.fpcwrs.live/robbie/services/trackbacks/299270.html</trackback:ping><description><![CDATA[<p>    q是前几天在别h的BLog上看到的一q图Q觉得不错,基本늛了IT人员需要掌握的基础知识q块Q从q幅图中可以看出语言q不重要Q关键是要搞明白整个环节Q这样遇CQ何问题就能有目的、有Ҏ的学习了?/p> <p><a href="http://www.fpcwrs.live/images/blogjava_net/robbie/WindowsLiveWriter/8d33739cf64a_7807/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%9F%A5%E8%AF%86%E4%BD%93%E7%B3%BB_4.gif"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="计算机知识体p? border="0" alt="计算机知识体p? src="http://www.fpcwrs.live/images/blogjava_net/robbie/WindowsLiveWriter/8d33739cf64a_7807/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%9F%A5%E8%AF%86%E4%BD%93%E7%B3%BB_thumb_1.gif" width="640" height="335"></a></p><img src ="http://www.fpcwrs.live/robbie/aggbug/299270.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.fpcwrs.live/robbie/" target="_blank">The Matrix</a> 2009-10-22 08:32 <a href="http://www.fpcwrs.live/robbie/archive/2009/10/22/299270.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ruby On Rails安装及第一天学?/title><link>http://www.fpcwrs.live/robbie/archive/2009/07/19/287292.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Sat, 18 Jul 2009 16:42:00 GMT</pubDate><guid>http://www.fpcwrs.live/robbie/archive/2009/07/19/287292.html</guid><wfw:comment>http://www.fpcwrs.live/robbie/comments/287292.html</wfw:comment><comments>http://www.fpcwrs.live/robbie/archive/2009/07/19/287292.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.fpcwrs.live/robbie/comments/commentRss/287292.html</wfw:commentRss><trackback:ping>http://www.fpcwrs.live/robbie/services/trackbacks/287292.html</trackback:ping><description><![CDATA[<p>1、下载Rubyq安装,下蝲地址Q?a title="http://rubyforge.org/frs/?group_id=167" href="http://rubyforge.org/frs/?group_id=167">http://rubyforge.org/frs/?group_id=167</a></p> <p>下蝲?.8.6-27 Release Candidate 2Qruby186-27_rc2.exeQ版?/p> <p>2、在windows的命令行下,输入 ruby –vQ检查ruby是否正确安装Q应该出现如下信息:</p> <p>ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]</p> <p>3、安装railsQ执行gem install rails命oQ安装成功后Q执行rails -v查?/p> <p>我安装了Rails2.3.2版本。用gem install -version rails可以指定安装的rails版本Q具体如何用gemQ可以用gem help install查看帮助?br /> </p> <p> </p> <p>参考:Ruby On RailsQRORQ安装(<a title="http://enjoylog.cn/?p=8" href="http://enjoylog.cn/?p=8">http://enjoylog.cn/?p=8</a>Q?/p> <p> </p> <p>装好了便到Ruby On Rails的官方网站(<a title="http://rubyonrails.org/" href="http://rubyonrails.org/">http://rubyonrails.org/</a>Q,扑ֈ?/p> <p>Getting Started with Rails(<a title="http://guides.rubyonrails.org/getting_started.html" href="http://guides.rubyonrails.org/getting_started.html">http://guides.rubyonrails.org/getting_started.html</a>)</p> <p>开始一步一步follow up?/p> <p>RubyOnRails的中文站上的译文档没有完全跟进Q还是看英文的吧?/p> <p> </p> <p>我用的是MySQL的数据库Q操作系l:Vista?/p> <p>到创建POSTS应用的时候遇C问题Q创建数据后数据库中有数据,但是到Listing posts界面无法查看QL报错?/p> <p>|上Google了一下,果然有h遇到相同的问题,参照了如下解x案,?/p> <p><a title="http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/" href="http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/">http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/</a> 上下载了libmySQL.dll文g攑ֈRUBY_HOME/bin/目录下,问题解决?/p> <p>参考:升2.2后mysql驱动的问题(<a title="http://www.javaeye.com/topic/283871?page=1" href="http://www.javaeye.com/topic/283871?page=1">http://www.javaeye.com/topic/283871?page=1</a>Q?/p> <p> </p> <p>感叹一下,当Listing Postsq个CRUD应用跑h后,觉得Ruby On Rails的开发是比Java开发要快一些,看了一下它生成的代码,貌似也不多?/p> <p> </p> <p>今天晚了Q明天l?/p> <img src ="http://www.fpcwrs.live/robbie/aggbug/287292.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.fpcwrs.live/robbie/" target="_blank">The Matrix</a> 2009-07-19 00:42 <a href="http://www.fpcwrs.live/robbie/archive/2009/07/19/287292.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>没有HibernateӞ我们怎么做项?amp;hellip;&hellip;http://www.fpcwrs.live/robbie/archive/2009/07/06/285719.htmlThe MatrixThe MatrixMon, 06 Jul 2009 14:06:00 GMThttp://www.fpcwrs.live/robbie/archive/2009/07/06/285719.html    最q在做一个很的目的功能改q,小的项目中原来q接的是MySQL数据库,现在需要新q接一个数据库QOracleQ,仅仅从一张表查询数据卛_Q没有添加、修攏V删除等{功能。本来这个小的目中用的是HibernateQ现在又要增加一个数据库q接Q觉得配|v来有炚w烦,忽然惌v来,我干吗还要用Hibernate呢,直接用JDBC不也挺好使么Q想了便做,果然写vJDBC来,很是快捷Q一会就搞好了?/p>

    做好了以后,忽然觉得有点qQ感觉不用Hibernate不也挺好的么Q咱Z么现在开口闭口都是Hibernate呢,于是便有了今天的题目?/p>

    很久以前没有Hibernate的时候:

    W一阶段Q我们写E序都是直接用JDBCQ甚臛_JSP面中直接去createConnectionQ然后执行查询,输出到页面?/p>

    W二阶段Q后来觉得每ơ都是创Z个连接,好像效率不高Q于是看了别人的介绍Q要用数据库q接池,好的Q那便用数据库连接池吧,每次都从pool中获得一个ConnectionQ然后查询数据?/p>

    W三阶段Q用了连接池Q还是效率不高,那怎么办呢Q用~存吧,自己实现~存Q可以,也可以用开源的~存框架?/p>

    W四阶段Q到了OO大流行的时代了,一切都要OOQ恰逢Hibernate降ZQ于是一切都用Hibernate来实CQ其实同期还是有不少其它ORMAP框架的,比如QTOPLINK、JDO、IBatis{,IBatis国内用的q比较多Q另外两个好像用的比较少Q?/p>

    W五阶段Q忽然EJB大流行,事务的概念被qؓ传播Qƈ不是原来没有事务的概念,只是实现h比较ȝQ,借助EJB的广Z播,Spring+Hibernate的组合也慢慢占据了大半市场。此时事务用Spring AOP的声明式事务来解冻I~存可以用开源的~存框架Q已l和Hibernate无缝集成了)Q数据库q接池也是通过配置的方式在SpringContext.xml文g中配|,貌似一切都很完?/p>

 

    真的CW五阶段Q一切是不是真的完美了呢Q如果一个很的应用Q需要从好几个数据库查询数据Q但是每个数据库仅需要查询那么一两张表的数据Q偶添加、删除几条数据,数据量也不大Q此时我们是不是q用W一阶段的方式会更好呢,好像有时配置多数据源也不是那么方便的事情。或者用Spring中的JDBCTemplateQ貌g不错?/p>

    再往后看Q难道Spring+Hibernate的组合就天下无敌了么Q难道就没有新的框架了么Q前D|_JavaEye上关于充血模型、血模型的讨论吸引了多少眼球Q以后是不是会有q么一个框架用于实现充血模型呢?

   说了q么多,最l只是想说明白这么一句:用恰当的技术做恰当的事情,q真是一个艰隄选择……Q至于未来,更是qQ因为我们只是跟随者,而不是领D?/p>

The Matrix 2009-07-06 22:06 发表评论
]]>
《深入浅出EXT JS》书?/title><link>http://www.fpcwrs.live/robbie/archive/2009/04/19/266409.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Sun, 19 Apr 2009 05:36:00 GMT</pubDate><guid>http://www.fpcwrs.live/robbie/archive/2009/04/19/266409.html</guid><wfw:comment>http://www.fpcwrs.live/robbie/comments/266409.html</wfw:comment><comments>http://www.fpcwrs.live/robbie/archive/2009/04/19/266409.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.fpcwrs.live/robbie/comments/commentRss/266409.html</wfw:commentRss><trackback:ping>http://www.fpcwrs.live/robbie/services/trackbacks/266409.html</trackback:ping><description><![CDATA[<p>前两天出差在外,利用IZ旉《深入浅出EXT JS》这本书的前五章M一遍,后面的章节粗_浏览了一下,觉得q本书写的不错,写下自己的一Ҏ悟:</p> <p>1、适合的读?/p> <blockquote> <p>a、是一名Java开发程序员Q做qWEB开?/p> <p>b、对Ajax开发的基础知识有所了解</p></blockquote> <p>2、书评:</p> <p>        q本书我觉得应该Ҏq个名字Q《EXT JS CookBook》,可能使得书的内容和名U更贴切Q呵c?/p> <p>        书中对Ext JS的基cRGrid、Form、Tree、布局理器、数据获取等各方面都做了详细的描qͼ基本上开发中需要用到的知识点,在书中都会提刎ͼ而且书中的很多例子和实际工作q是非常贴切的,对于工作中需要用到EXT JS或者需要学习EXT JS的程序员来说q是会很有帮助的?/p> <p>        最后提点缺点,q本书中对EXT JS的知识点都做了比较详l的描述Q但是缺乏对EXT JS的框架的深入分析?/p><img src ="http://www.fpcwrs.live/robbie/aggbug/266409.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.fpcwrs.live/robbie/" target="_blank">The Matrix</a> 2009-04-19 13:36 <a href="http://www.fpcwrs.live/robbie/archive/2009/04/19/266409.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Flex Clear Toolkit3.1http://www.fpcwrs.live/robbie/archive/2009/04/12/265164.htmlThe MatrixThe MatrixSun, 12 Apr 2009 12:57:00 GMThttp://www.fpcwrs.live/robbie/archive/2009/04/12/265164.htmlhttp://www.fpcwrs.live/robbie/comments/265164.htmlhttp://www.fpcwrs.live/robbie/archive/2009/04/12/265164.html#Feedback0http://www.fpcwrs.live/robbie/comments/commentRss/265164.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/265164.html前两天在InfoQ上看C文章:利用Clear Toolkitq接Flex与Java开?/a>Q今天下载了说明文档_略了翻了一遍,Clear Toolkit包含五个部分Q分别是Q?/p>
  • Clear Data BuilderQ这是个Eclipse插gQ可以根据SQL语句或Java数据传输对象为BlazeDS或LCDS自动生成CRUD应用?
  • DTO2FxQ该插g会根据Javacd自动生成对应的ActionScriptcR?
  • Log4Fx是个构徏于Flex logging API之上的Eclipse插gQ它会自动化日志处理q且更加灉|Q也更加友好?
  • Fx2Ant插g会ؓFlex Builder目生成优化的Ant构徏脚本?
  • clear.swc是个增强的Flexlg库?

暂时用不到这个工P记录留待备查?/p>

The Matrix 2009-04-12 20:57 发表评论
]]>
Hibernate~存配置http://www.fpcwrs.live/robbie/archive/2009/04/07/264359.htmlThe MatrixThe MatrixTue, 07 Apr 2009 14:54:00 GMThttp://www.fpcwrs.live/robbie/archive/2009/04/07/264359.htmlhttp://www.fpcwrs.live/robbie/comments/264359.htmlhttp://www.fpcwrs.live/robbie/archive/2009/04/07/264359.html#Feedback3http://www.fpcwrs.live/robbie/comments/commentRss/264359.htmlhttp://www.fpcwrs.live/robbie/services/trackbacks/264359.htmlq篇Blog是原来写在别的地方的Q今天将其{到BlogJava上来?br /> -------------------------------------------------------------------------------

今天仔仔l细的看了一下Hibernate的缓存,q做了实例实践了一把。google一下,|上的教E、文章很多?br /> 自己结一下:

Hibernate的缓存分为:

  • 一U缓存:在SessionU别的,在Session关闭的时候,一U缓存就失效了?
  • 二~存Q在SessionFactoryU别的,它可以用不同的~存实现Q如EhCache、JBossCache、OsCache{?

~存的注释写法如下,加在Entity的javacMQ?/p>

  • @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)

~存的方式有四种Q分别ؓQ?/p>

  • CacheConcurrencyStrategy.NONE
  • CacheConcurrencyStrategy.READ_ONLYQ只L式,在此模式下,如果Ҏ据进行更新操作,会有异常Q?
  • CacheConcurrencyStrategy.READ_WRITEQ读写模式在更新~存的时候会把缓存里面的数据换成一个锁Q其它事务如果去取相应的~存数据Q发现被锁了Q直接就L据库查询Q?
  • CacheConcurrencyStrategy.NONSTRICT_READ_WRITEQ不严格的读写模式则不会的缓存数据加锁;
  • CacheConcurrencyStrategy.TRANSACTIONALQ事务模式指~存支持事务Q当事务回滚Ӟ~存也能回滚Q只支持JTA环境?

另外q有如下注意事项Q?/p>

1、查询缓存需要在Query的相应方法执行前加上q么一句:

query.setCacheable(true);

在用HibernateӞ获得的query有setCacheableҎQ可以设|用缓存,但当使用JPAӞjavax.persistence.Queryq没有setCacheableҎQ此时如果JPA的实现是HibernateӞ可以其q行如下转化Q再调用setCacheableҎQ如果JPA的实现是其它ORMAP框架Q就不知道怎么做了Q?/p>

if (query instanceof org.hibernate.ejb.QueryImpl) {
    ((org.hibernate.ejb.QueryImpl) query).getHibernateQuery().setCacheable(
true);
}

2、还有就是查询缓存的查询执行后,会将查询l果攑օ二~存中,但是攑օ的Ş式是以ID为KeyQ实例作Z个Value?/p>

3、hibernate的配|文件中需加入如下信息Q?br />

<property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider" />
<property name="hibernate.cache.use_second_level_cache" value="true" />
<property name="hibernate.cache.use_query_cache" value="true" />




The Matrix 2009-04-07 22:54 发表评论
]]>
ħǹ ʱʱʿֱַ ʮһѡ淨 11ѡ5Ԥ Ͷע ʮһѡƻ ս׬Ǯ 11ѡ5ɲòѧ׬ؼ ձ ֵ׬Ǯ Ʊ11ѡ5 28ԭƽ ﳵ׬Ǯĸ ɹ11ѡ5ͼ ֱֳ ÿƵ׬Ǯ appע10