1. 多线程等待机制

    现有一个遗留系统中,用到了很多多线程。其中等待机制是这么做的: 1. 主线程在需要等待的时候,先开启一个等待线程。初始化时预定一个时间。等待线程启动后立刻 wait()/wait(nTime). 2. 主线程 join 等待线程 3. 外部事件到达时,interrupt 等待线程。E.g. in a listener or update method 4. 主线程继续执行下去 这种方式利用了InterruptedException控制业务逻辑,除了这个缺点外不知还有没有别的弊端?

    2017/02/12 iteye

  2. Hibernate笔记

    inverse=true | false   2. cascade   3. lazy-loading   4. session-per-request & open session filter   5. transaction demarcation

    2017/02/12 iteye

  3. IBM SOA 产品线

    Model Phase       Websphere Business Modeler     Rational Software Architect   2. Assemble Phase          Rational Appliction Developer      Websphere Integration Developer      Websphere Portlet Factory       ...   3. Deploy Phase      Websphere Application Server      Websphere Portal Server      Websphere Porcess Server      Websphere ESB      Websphere Message Broker      Websphere MQ      ...   4. Manage Phase        Tivoli Access Manager      Websphere Business Monitor      ...   5. Governance        Websphere Service Registry and Repository      Rational Asset Manager      ...

    2017/02/12 iteye

  4. Jetspeed2

    refer to: http://portals.apache.org/jetspeed-2/tutorial/01/genapp.html   Setup:   1.  generate two maven submodules: jetexpress-portal and jetexpress-pa.   mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate \     -DarchetypeGroupId=org.apache.portals.jetspeed-2 \     -DarchetypeArtifactId=jetspeed-archetype \     -DarchetypeVersion=2.2.0 \     -DartifactId=jetexpress \     -Dpackage=org.apache.portals.tutorials \     -DgroupId=org.apache.portals.tutorials \     -Dversion=1.0-SNAPSHOT   2. change file jetspeed-mvn-settings.xml   2.1 Find the org.apache.jetspeed.server.home configuration parameter and change the path to where you installed Tomcat   2.2 Find the org.apache.jetspeed.production.database.url configuration parameter   3. create file %USERPROFILE%.m2\settings.xml org.apache.portals.jetspeed-2   4. mvn jetspeed:mvn -Dtarget=all     deploy to the tomcat server        access: http://localhost:8080/jetexpress/portal   5. wroking in  Eclipse Env   5.1 mvn eclipse:eclipse   5.2  In Eclipse, go to Window->Preferences->Java->Build Path->Classpath Variables->New and enter the location of your local Maven repository  M2_REPO (typically this is inside a .m2 directory in your user home/profile directory.   5.3 import jetexpress-portal and jetexpress-pa projects   5.4 add portlet in jetexpress-pa project   5.5 deploy to tomcat ENV   mvn jetspeed:mvn -Dtarget=deploy-pa mvn jetspeed:mvn -Dtarget=deploy-portal   access: http://localhost:8080/jetexpress/portal        Create A New Page:    1.  make dir under such as demo       \jetexpress\jetexpress-portal\src\main\webapp\WEB-INF\pages\demo   2. copy and edit folder.metadata & default-page.psml   3.  deploy mvn jetspeed:mvn -Dtarget=deploy-pa mvn jetspeed:mvn -Dtarget=deploy-portal   access: http://localhost:8080/jetexpress/portal  

    2017/02/12 iteye

  5. Web相关

    Tomcat load balance/cluster/fail off   2. SSO based on CAS      tomcat      JBoss portal      SSL   3. Acegi filter / JAAS   4.

    2017/02/12 iteye

  6. AJAX lib 比较

    摘自:http://www.ibm.com/developerworks/cn/web/wa-aj-advjquery/   结论 1:Mootools、jQuery 和 Dojo 在性能方面不分上下。 根据性能进行分类的话,这些库可以分为两组,而不管使用什么浏览器(FF,IE,Chrome)。Mootools、Dojo 和 jQuery 通常属于一个组别,而 Prototype 和 YUI 属于另一个组别,前一组要比后一组快得多。   JavaScript 速度差异的主要原因是每个浏览器都使用自己的 JavaScript 引擎。JavaScript 在这些浏览器中运行得到的时间差很大。jQuery 选择方法在 IE6 上运行比在 Chrome 上运行慢 10 倍。   结论 2:Prototype 和 YUI 的性能很慢   结论 3:浏览器对性能的影响是 JavaScript 库的 9 倍。您可以在特定情况下讨论哪个 JavaScript 库最快,但它最终的影响却是很小的!对于性能而言,浏览器的影响比库本身要大得多。  

    2017/02/12 iteye

  7. liferay笔记

    扩展开发方式       refer to:       1) http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Development%20Environment%20(Windows);jsessionid=DB374B4B6CDBE3F3211E4538AAB5CFB5       2) http://hi.baidu.com/joelli/blog/item/8205a0ed7103034579f05514.html 这个比较靠谱       主要步骤是: 1.1 安装对应的JDK,Ant,Tomcat。设置环境变量 1.2 下载liferay源文件并导入Eclipse 1.3  添加三个文件覆盖参数             app.server.{your_name}.properties:设置tomcat目录             release.{your_name}.properties: 设置EXT工程目录             build.{your_name}.properties: 设置Build.xml的一些属性              1.4  ant clean start build-ext   1.5 配置mysql         1.5.1 create database lportal       1.5.2  execute script liferay-portal-src-5.2.3\sql\portal-minimal. edit ext-impl/src/portal-ext.properties ## MySQL jdbc.default.driverClassName=com.mysql.jdbc.Driver jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false jdbc.default.username=root jdbc.default.password=     1.6  ant clean deploy        2. lifeRay plugin SDK 开发   2.1 download the plugins SDK from the 'Additional Files' section on the Liferay website. 2.2 This provides ant scripts, to create a simple JSR compliant portlet   ant -Dportlet.name= -Dportlet.display.name="" create    2.3 转化成Eclipse project   ant setup-eclipse  2.4 自己搞定build path问题,这里的jar包都是指向liferay 源文件里面的lib 包。所以本地最好有liferay源文件.   2.5 ant deploy   2.6 liferay 页面可以用这个新添加的portlet了    

    2017/02/12 iteye

  8. Javascript Drag&Drop 小例子

    <!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <title> 代码实例:拖动对象 Drag Object (兼容:IE、Firefox、Opera ... ) <style> .dragAble {position:relative;cursor:move;} <script language="javascript"> function moveMouse(e) { if (isdrag) { oDragObj.style.top = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y)+"px"; oDragObj.style.left = (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x)+"px"; return false; } } function initDrag(e) { var oDragHandle = nn6 ? e.target : event.srcElement; var topElement = "HTML"; while (oDragHandle.tagName != topElement && oDragHandle.className != "dragAble") { oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement; } if (oDragHandle.className=="dragAble") { isdrag = true; oDragObj = oDragHandle; nTY = parseInt(oDragObj.style.top+0); y = nn6 ? e.clientY : event.clientY; nTX = parseInt(oDragObj.style.left+0); x = nn6 ? e.clientX : event.clientX; document.onmousemove=moveMouse; return false; } } document.onmousedown=initDrag; document.onmouseup=new Function("isdrag=false"); //--> 这些都是可拖动对象 我也可以动吗?     from:  http://blog.csdn.net/xyk0830/archive/2007/11/07/1871712.aspx

    2017/02/12 iteye