2013年3月11日 星期一

Tomcat7 & JConsole & JMX

不知道是不是因為Timcat7的關係, 網路上找到的設定都沒辦法成功
最後總結成功的設定(基本上參考http://www.haogongju.net/art/1762695)

1. download ​​catalina-jmx-remote.jar from http://tomcat.apache.org/download-70.cgi(address may change)
and save to $CATALINA_HOME/lib

2. Add Listener to server.xml, in my case


3. set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=[Host IP]

3.1 If use CATALINA_OPTS will cause Exception (java.io.FileNotFoundException: jmxremote.access) in my case.
3.2 -Djava.rmi.server.hostname=[Host IP] is essential if want to connect remotely.

4. Start Tomcat

5. Run jconsole Remote Process with :9081

It works!!



Windows & Telnet?

其實我的問題是發生在Windows7

官方的解答
http://support.microsoft.com/kb/982538/zh-tw

...

當我嘗試在 Windows 7 中使用 telnet 功能時,卻出現了錯誤訊息【’telnet’ 不是內部或外部命令、可執行的程式或批次檔】,爲什麽會發生這樣的問題呢?

其實 Window 7 作業系統預設並沒有安裝 Telnet 用戶端程式,所以只有手動新增安裝,就可以解決這個問題了。

...

控制台 >  程式集 >  開啟或關閉Windows功能 > 勾選"Telnet用戶端"


2013年2月23日 星期六

動態網頁開發(ZK+Spring+Hibernate+Scheduler+Flot)

因緣際會, 9年沒碰過網頁, 半年前又開始這方面的應用,有不少的心得, 技術的進展真的非常大, 不像寫系統韌體, 數年如一日, 只要有多工概念,會C和基本IO, 就可以上場了.

但在近十年,網頁的呈現以及開發的便利性和Desktop Application已經非常類似, 對應的技術更是五花八門, 需要挑選以及整合出自己要的應用框架

目前我選用的架構是用ZK+Spring+Hibernate+Scheduler+Flot, 目前看來應該沒什麼問題

Flot是用在Chart上面, 要多花一點功夫去整合零散的資源, 其它都算是Java標準的整合方式

若需要連網路芳鄰 or SMB, JCIFS是不錯的選擇, 可惜和Apache VFS整合只有檔案,不支援目錄, 不然我傾向用VFS, 這樣連FTP, WebDav都可以用同一介面, 建議可以參與VFS修改或是從VFS, JCIFS之上自己再包一層, 我傾向後者

整合Excel file當然是用Apache POI

[English]dare

http://www.iciba.com/dare

Usage Note :
You can leave out the word to after dare in the above sense. Nobody dared complain. The formdares is never used in a question or in a negative statement. You use dare instead. Dare she tell him?... He dare not enter .
dare 用於以上義項時,其後的to 可以省略:Nobody dared complain (沒有人敢抱怨)。在疑問句或否定句中,不可用dares, 而應用dare:Dare she tell him (她敢告訴他嗎),He dare not enter. (他不敢進去)。

2012年8月11日 星期六

[English]The Five Cents

閃點行動(Flashpoint) S04E09 00:40:54

Do I give you the five cents now?
我現在像是在對你說廢話嗎?

Supplement:
http://www.englishenhancer.com/2008/09/03/my-five-cents/
Both the phrases “My five cents” or “put in one’s two cents’ worth” are used when one wants to give one’s opinion on some topic.

[English]You wanna sit this next one out

閃點行動(Flashpoint) S04E06 00:42:04
You wanna sit this next one out....
你想跳過這個任務....

sit out
sit this one out
sit the next one out