2005/09/07

[troubleshooting] [EJB:010207]License validation not passed for 2.0

exception msg
Module Name: QueueTransportEJB, Error: Exception preparing module: EJBModule(QueueTransportEJB,status=NEW)
Unable to deploy EJB: /bea/weblogic81/server/lib/QueueTransportEJB.jar from QueueTransportEJB.jar:
java.lang.Exception: [EJB:010207]License validation not passed for 2.0.'


因為客戶的版本是express的版本(不含EJB Container),但是其在create domain的時候,使用sample此template(有EJB的code),改採server此temaplte來create即可

[How-To] memory allocation for WLS

關於memory allocation,你要加在此行(位於script file的下半部):
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -ms512m -mx512m -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy="%WL_HOME%\server\lib\weblogic.policy" weblogic.Server

512的地方可以replace成你想要的memory的量

[How-To] Capacity Estination

http://www.spec.org/

http://e-docs.bea.com/wls/docs81/capplan/capbase.html#1055436

[info] Linux Tuning Parameters Tuning

http://e-docs.bea.com/wls/docs81/perform/HWTuning.html#1121228

Java2005專業技術大會 Slide

http://www.javatwo.net/Event/j2/2005/download/index.html

[troubleshooting] admin console密碼更改的問題

關於admin console的帳號密碼更改的問題,在admin console所變更的密碼,其不會同步更新到boot.properties這個file,所以,如果有變更密碼,就需要重新編輯此檔案(boot.properties)。

[troubleshooting] how to retrieve client's IP if WLS had plugin apache

For non-clustered servers that will receive proxied requests, this attribute may be set at the server level, on the Server -->Configuration-->General tab-->Advanced Options
把server instance的這個值enable起來,然後server要restart

reference: domain_cluster_config_general.html

[troubleshooting] Connection has already been created in this tx context for pool

scenario:
database:mysql
They had two mysql database connections. The first one is used to read data, and the second one is used to write data into another database. And they also check "Emulate Two-Phase Commit for non-XA driver" this option, but it still does not work.

Exception in context_onAcquire
java.sql.SQLException: Connection has already been created in this tx context for pool named dbsvr1_mysql. Illegal attempt to create connection from another pool: wssvr1_wsclub


According to the exception message, it means you can't use more than one non-XA connection pool in distributed transaction.
If you want to implement one user control calling two DB controls, you will have one transaction using two connections at the same time.
Only an XA transaction with 2PC support can do the job. You need to use XA driver.

I searched for the doc MYSQL, and find MYSQL 5.1 will support XA. But unfortunately, now the latest version of MYSQL is 5.0.
I think there's no good method on weblogic side which can handle the two connection pools with two non-xa drivers condition.

http://e-docs.bea.com/wls/docs81/faq/JTA.html#738373

2005/08/25

[troubleshooting] Resolve Too Many Open Files

Resolve Too Many Open Files

Troubleshooting Guidance Support Diagnostic Patterns

之前一直發現rlim_fd_max這個值始終都是預設的1024這個值,並不是user設定後的值,原來是在啟動的時候,他會去跑commEvn.sh裡頭的resetFd()這個function,裡頭會把值還原成1024,把它comment掉就好了。

[troubleshooting] WLS 8.1 亂碼解決方法

http://www.ddvip.net/program/java/index6/281.htm

in web.xml add:
<context-param>
<param-name>weblogic.httpd.inputCharset./*</param-name>
<param-value>BIG5</param-value>
</context-param>


in weblogic.xml add:
<jsp-descriptor>
<jsp-param>
<param-name>compileCommand</param-name>
<param-value>javac</param-value>
</jsp-param>
<jsp-param>
<param-name>compilerSupportsEncoding</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>encoding</param-name>
<param-value>BIG5</param-value>
</jsp-param>
</jsp-descriptor>

2005/08/15

Smartly load your properties

Link

Example
Assume I have a property file which named config, and this file locate at src/albert.
This file contains two values:
name=albert
email=junyuo@gmail.com

Then you can utilize this approach to read this property file

InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("albert/config.properties");
PropertyResourceBundle rb = new PropertyResourceBundle(is);
System.out.println("name="+rb.getString("name"));
System.out.println("email="+rb.getString("email"));

2005/07/02

0B0-104(BEA 8.1 Certified Administrator)考試心得

0B0-104考試簡介
 
此項考試的全名是:BEA 8.1 Certified Administrator : System Administration,考試代號是0B0-104。考試題數共69題,時間120分鐘,通過比率66%,報名費5000元。考試的詳細資訊請參考此網址:http://www.bea.com.tw/07services/techdoc/07services_03_04.htm
 
 

0B0-104考試報名

如果你之前參加透過Prometric舉辦的考試,考試ID仍舊可以沿用,無須重新申請。報名的話,可以打電話去報名(08001611141),告訴對方你的考試ID、要報名的考試科目名稱、考試時間、考試地點即可。

 
0B0-104 Study Guide

http://certification.bea.com/certification/study_guide
/System_Administration_11_12_04.htm,此link有告訴你此考試的準備方向,參考書籍以及模擬考題。JavaRanch此論壇的此thread也有針對此考試有一些在準備上的討論:http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=61&t=001195
 

0B0-104考試心得

考試的題型只有兩種:單選題與拖拉題。就整個考試內容來說,著重於幾個部份:Cluster, Performance Tuning, JMS, LDAP與Security, Application Deployment, JMS, Node Manager及Network Channel。拖拉題只有三題:Sever Life-Cycle、Heuristic Transaction、JMS File Store Synchronization Write Policy解釋 : Disabled, Cache-Flush, Direct-Write