Start Oracle server in UNIX
Type the following command, enter:
Login as oracle:
[oracle]#su - oracle
start service:
[oracle]# lsnrctl start
Note: command=lsnrctl=LSNRCTL
start database:
[oracle]#dbstart
Monday, May 24, 2010
Friday, April 30, 2010
Enable Eclipse Remote Debug in JBoss
1. Open run.bat and find the lines that look like this:
rem enable remote debugging.
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y %JAVA_OPTS%
2. Start Jboss. (JBoss will hang there until you connect a debugger to it.)
3. In Eclipse, open your project, and on the toolbar click on the debugger bug arrow, then Open Debug Dialog.
4. Choose "Remote Java Application", right-click, New… and update the port to the address in the run.bat (address=8000, you could change it to any no).
5. Click Debug
6. Set a break point somewhere in your code or a library that has source attached
7. Exercise your project (via a web service, for instance) and when it hits one of your breakpoints, it will break in Eclipse.
rem enable remote debugging.
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y %JAVA_OPTS%
2. Start Jboss. (JBoss will hang there until you connect a debugger to it.)
3. In Eclipse, open your project, and on the toolbar click on the debugger bug arrow, then Open Debug Dialog.
4. Choose "Remote Java Application", right-click, New… and update the port to the address in the run.bat (address=8000, you could change it to any no).
5. Click Debug
6. Set a break point somewhere in your code or a library that has source attached
7. Exercise your project (via a web service, for instance) and when it hits one of your breakpoints, it will break in Eclipse.
Wednesday, April 28, 2010
Ibatis - BLOB Data Type
<resultMap id="soapDataResult" class="soapRequest">
<result property="action" column="ACTION"/>
<result property="reqMsg" column="REQ_MSG" jdbcType="BLOB"/>
</resultMap>
<update id="updateSoap" parameterClass="soapRequest">
UPDATE SOAP_REQUEST
SET REQ_MSG = #reqMsg:BLOB#
</update>
<result property="action" column="ACTION"/>
<result property="reqMsg" column="REQ_MSG" jdbcType="BLOB"/>
</resultMap>
<update id="updateSoap" parameterClass="soapRequest">
UPDATE SOAP_REQUEST
SET REQ_MSG = #reqMsg:BLOB#
</update>
Thursday, April 8, 2010
Unicode Character Set
Useful link
http://www.querytool.com/help/907.htm
http://www.oracle.com/technology/tech/globalization/pdf/TWP_NCHAR_Migration_10gR1.pdf
http://www.querytool.com/help/907.htm
http://www.oracle.com/technology/tech/globalization/pdf/TWP_NCHAR_Migration_10gR1.pdf
Tuesday, March 30, 2010
Convert Native to Ascii
Run below batch script in command prompt:-
native2ascii -encoding UTF-8 chinese.txt messages.properties
p/s: no need install any software
**********
Sample Content: chinese.txt
prompt.OldPassword=請輸入 [舊密碼]
prompt.NewPassword=請輸入 [新密碼]
prompt.ConfirmPassword=請輸入 [確認密碼]
prompt.PasswordLength=請輸入6-8位數字的 [新密碼]
***********
Sample Output: message.properties
prompt.OldPassword=\u8acb\u8f38\u5165 [\u820a\u5bc6\u78bc]
prompt.NewPassword=\u8acb\u8f38\u5165 [\u65b0\u5bc6\u78bc]
prompt.ConfirmPassword=\u8acb\u8f38\u5165 [\u78ba\u8a8d\u5bc6\u78bc]
prompt.PasswordLength=\u8acb\u8f38\u51656-8\u4f4d\u6578\u5b57\u7684 [\u65b0\u5bc6\u78bc]
native2ascii -encoding UTF-8 chinese.txt messages.properties
p/s: no need install any software
**********
Sample Content: chinese.txt
prompt.OldPassword=請輸入 [舊密碼]
prompt.NewPassword=請輸入 [新密碼]
prompt.ConfirmPassword=請輸入 [確認密碼]
prompt.PasswordLength=請輸入6-8位數字的 [新密碼]
***********
Sample Output: message.properties
prompt.OldPassword=\u8acb\u8f38\u5165 [\u820a\u5bc6\u78bc]
prompt.NewPassword=\u8acb\u8f38\u5165 [\u65b0\u5bc6\u78bc]
prompt.ConfirmPassword=\u8acb\u8f38\u5165 [\u78ba\u8a8d\u5bc6\u78bc]
prompt.PasswordLength=\u8acb\u8f38\u51656-8\u4f4d\u6578\u5b57\u7684 [\u65b0\u5bc6\u78bc]
Subscribe to:
Posts (Atom)