锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧洲专线一区,亚洲人成网站18禁止,亚洲av午夜精品一区二区三区http://www.tkk7.com/jedikings/zh-cnMon, 12 May 2025 18:21:48 GMTMon, 12 May 2025 18:21:48 GMT60JTA in Jboss (DataBase mysql)http://www.tkk7.com/jedikings/archive/2006/09/01/66990.htmlJediJediFri, 01 Sep 2006 00:55:00 GMThttp://www.tkk7.com/jedikings/archive/2006/09/01/66990.htmlhttp://www.tkk7.com/jedikings/comments/66990.htmlhttp://www.tkk7.com/jedikings/archive/2006/09/01/66990.html#Feedback0http://www.tkk7.com/jedikings/comments/commentRss/66990.htmlhttp://www.tkk7.com/jedikings/services/trackbacks/66990.html1. mysql driver -> server\default\lib
2. jdbc connection datasource server/default/deploy/mysql-xa-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
聽<xa-datasource>
聽聽<jndi-name>MySqlXADS</jndi-name>
聽聽<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
聽聽<xa-datasource-property name="Url">jdbc:mysql://127.0.0.1:3306/temp</xa-datasource-property>
聽聽<xa-datasource-property name="User">root</xa-datasource-property>
聽聽<xa-datasource-property name="Password">....</xa-datasource-property>
聽聽<user-name>root</user-name>
聽聽<password>.....</password>
聽聽<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
聽聽<metadata>
聽聽聽<type-mapping>mySQL</type-mapping>
聽聽</metadata>
聽</xa-datasource>
</datasources>

3. server/default/conf/standardjbosscmp-jdbc.xml
<defaults>
聽聽聽聽聽 <datasource>java:/MySqlXADS</datasource>
聽聽聽聽聽 <datasource-mapping>mySQL</datasource-mapping>
....
....聽聽
</defaults>

4. server/default/conf/jboss-service.xml
<mbean code="org.jboss.tm.XidFactory"
聽聽聽聽聽 name="jboss:service=XidFactory">
聽//uncommented the line below...
聽聽聽聽聽 <attribute name="Pad">true</attribute>
聽聽 </mbean>



Jedi 2006-09-01 08:55 鍙戣〃璇勮
]]>
Axis Tipshttp://www.tkk7.com/jedikings/archive/2006/08/15/58338.htmlJediJediTue, 15 Aug 2006 01:22:00 GMThttp://www.tkk7.com/jedikings/archive/2006/08/15/58338.htmlhttp://www.tkk7.com/jedikings/comments/58338.htmlhttp://www.tkk7.com/jedikings/archive/2006/08/15/58338.html#Feedback0http://www.tkk7.com/jedikings/comments/commentRss/58338.htmlhttp://www.tkk7.com/jedikings/services/trackbacks/58338.html2. 涓嶈鐢↙ist錛屽敖閲忕敤鏁扮粍!
ValueBean[]聽getValues()聽
聽聽聽聽
{聽
聽聽聽聽聽聽聽聽ArrayList聽result聽
=new聽ArrayList();聽
聽聽聽聽聽聽聽聽
return聽(ValueBean[])聽result.toArray();聽
聽聽聽聽}
涓婇潰鐨勪唬鐮佽繕鏄細鍑洪棶棰橈紝瑕佺敤iterator涓涓竴涓猰ap榪囧幓
publicclass聽ValueHelper聽
聽聽聽聽
{聽
聽聽聽聽聽聽聽聽
publicstatic聽ValueBean[]聽toArray(List聽values)聽
聽聽聽聽聽聽聽聽
{
聽聽聽聽聽聽聽聽聽聽聽聽ValueBean[]聽result聽
=new聽ValueBean[values.size()];聽
聽聽聽聽聽聽聽聽聽聽聽聽Iterator聽i聽
=聽values.iterator();聽
聽聽聽聽聽聽聽聽聽聽聽聽
int聽i聽=0;聽
聽聽聽聽聽聽聽聽聽聽聽聽
while聽(i.hasNext())聽
聽聽聽聽聽聽聽聽聽聽聽聽
{聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽ValueBean聽value聽
=聽(ValueBean)聽i.next();聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽result[i
++]聽=聽value;聽
聽聽聽聽聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽聽聽聽聽
return聽result;聽
聽聽聽聽聽聽聽聽}

聽聽聽聽}

聽聽聽聽ValueBean[]聽getValues()聽
{聽
聽聽聽聽聽聽聽聽ArrayList聽result聽
=new聽ArrayList();聽聽
聽聽聽聽聽聽聽聽
return聽ValueHelper.toArray(result);聽
聽聽聽聽}
3. 瑕佺敓鎴愮鍚坵s-i鐨剋eb service鏈濂界敤document/literal
<service name="MyWebRes" provider="java:RPC" style="document "use="literal">

Jedi 2006-08-15 09:22 鍙戣〃璇勮
]]>
A good Http debug Utility - fiddlerhttp://www.tkk7.com/jedikings/archive/2006/08/15/58599.htmlJediJediTue, 15 Aug 2006 01:15:00 GMThttp://www.tkk7.com/jedikings/archive/2006/08/15/58599.htmlhttp://www.tkk7.com/jedikings/comments/58599.htmlhttp://www.tkk7.com/jedikings/archive/2006/08/15/58599.html#Feedback0http://www.tkk7.com/jedikings/comments/commentRss/58599.htmlhttp://www.tkk7.com/jedikings/services/trackbacks/58599.htmlhttp://www.fiddlertool.com/fiddler/聽
.net framework 1.1 needed

for firefox need some added configurat

menu->tools->preference/option->connection settings->bottom->

C:\Documents and Settings\jedikings\My Documents\Fiddler\Scripts\BrowserPAC.js -> reload



Jedi 2006-08-15 09:15 鍙戣〃璇勮
]]>
Mozilla web service proxy~~ (for all Gecko-based browser)http://www.tkk7.com/jedikings/archive/2006/07/11/57630.htmlJediJediTue, 11 Jul 2006 04:13:00 GMThttp://www.tkk7.com/jedikings/archive/2006/07/11/57630.htmlhttp://www.tkk7.com/jedikings/comments/57630.htmlhttp://www.tkk7.com/jedikings/archive/2006/07/11/57630.html#Feedback0http://www.tkk7.com/jedikings/comments/commentRss/57630.htmlhttp://www.tkk7.com/jedikings/services/trackbacks/57630.html var 聽proxy = null ;
function聽getTest()聽聽//聽test聽by聽the聽way聽amazon聽uses
{
聽聽聽聽
if聽(!proxy)聽{
聽聽聽聽聽聽聽聽
var聽listener聽={聽
聽聽聽聽聽聽聽聽
//聽gets聽called聽once聽the聽proxy聽has聽been聽instantiated
聽聽聽聽聽聽聽聽聽聽聽聽onLoad:聽function聽(aProxy)聽
聽聽聽聽聽聽聽聽聽聽聽聽
{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽proxy聽
=聽aProxy;
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽proxy.setListener(listener);
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽requestTest();
聽聽聽聽聽聽聽聽聽聽聽聽}
,
聽聽聽聽聽聽聽聽
//聽gets聽called聽if聽an聽error聽occurs
聽聽聽聽聽聽聽聽聽聽聽聽onError:聽function聽(aError)聽
聽聽聽聽聽聽聽聽聽聽聽聽
{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽alert(aError);
聽聽聽聽聽聽聽聽聽聽聽聽}
,
聽聽聽聽聽聽聽聽
//聽callback聽function聽is聽hardcoded聽to聽{methodname}Callback聽in聽1.4beta
聽聽聽聽聽聽聽聽聽聽聽聽getInstanceByIDCallback聽:聽function聽(aresult)聽
聽聽聽聽聽聽聽聽聽聽聽聽
{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽alert(
"enter聽callback");聽聽聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//alert("a="+aresult.a+",聽b="+aresult.b);
聽聽聽聽聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽}
;
聽聽聽聽聽聽聽聽createProxy(listener);
聽聽聽聽}

聽聽聽聽
else{
聽聽聽聽聽聽聽聽requestTest(
);
聽聽聽聽}

}

function聽createProxy(aCreationListener)聽
{
聽聽聽聽
try{
聽聽聽聽聽聽聽聽
var聽factory聽=new聽WebServiceProxyFactory();
聽聽聽聽聽聽聽聽factory.createProxyAsync("...wsdl location...."
,聽"binding name",聽"",聽true,聽aCreationListener);
聽聽聽聽}

聽聽聽聽
catch聽(ex)聽{
聽聽聽聽聽聽聽聽alert(
"test聽"+聽ex);
聽聽聽聽}

}


function聽requestTest()聽
{
聽聽聽聽
if聽(proxy)聽{
聽聽聽聽聽聽聽聽netscape.security.PrivilegeManager.enablePrivilege(
"UniversalBrowserRead");
聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽
/*
聽聽聽聽聽聽聽聽//聽if聽complex聽object聽is聽the聽parameter
聽聽聽聽聽聽聽聽var聽KeywordSearchRequest聽=聽new聽Object();聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽KeywordSearchRequest.page="1";
聽聽聽聽聽聽聽聽KeywordSearchRequest.mode="books";
聽聽聽聽聽聽聽聽KeywordSearchRequest.tag="webservices-20";
聽聽聽聽聽聽聽聽KeywordSearchRequest.type="lite";
聽聽聽聽聽聽聽聽KeywordSearchRequest.devtag="D2Z2KU2NWTOHI";
聽聽聽聽聽聽聽聽KeywordSearchRequest.format="xml";
聽聽聽聽聽聽聽聽KeywordSearchRequest.version="1.0";
聽聽聽聽聽聽聽聽
*/

聽聽聽聽聽聽聽聽proxy.getInstanceByID(
"id.....");
聽聽聽聽聽聽聽聽alert(
"call聽complete!");
聽聽聽聽}

聽聽聽聽
else{
聽聽聽聽聽聽聽聽alert(
"Error:聽Proxy聽set聽up聽not聽complete!");
聽聽聽聽}

}

鐢ㄨ搗鏉ヨ繕鏄緢綆鍗曪紝鍞竴瑕佹敞鎰忕殑鏄敤Axis鐢熸垚Web Service鐨勬椂鍊欒寰楀湪global configuration閲岄潰鏀逛竴涓?br /><parameter name="sendMultiRefs" value="false"/>

ie涓嬬殑璇濅篃鏈変竴涓獁ebservice.htc錛屾病浠旂粏鐮旂┒榪?.

Jedi 2006-07-11 12:13 鍙戣〃璇勮
]]>
Reading notes -- Singleton patternhttp://www.tkk7.com/jedikings/archive/2006/07/09/57330.htmlJediJediSun, 09 Jul 2006 04:42:00 GMThttp://www.tkk7.com/jedikings/archive/2006/07/09/57330.htmlhttp://www.tkk7.com/jedikings/comments/57330.htmlhttp://www.tkk7.com/jedikings/archive/2006/07/09/57330.html#Feedback0http://www.tkk7.com/jedikings/comments/commentRss/57330.htmlhttp://www.tkk7.com/jedikings/services/trackbacks/57330.html public class 聽Singleton聽{

聽聽聽聽
private volatile static 聽Singleton聽uniqueInstance;
聽聽聽聽
private 聽Singleton(){
聽聽聽聽聽聽聽聽
聽聽聽聽}
聽聽聽聽
聽聽聽聽
public static 聽Singleton聽getInstance(){
聽聽聽聽聽聽聽聽
if (uniqueInstance == null ){
聽聽聽聽聽聽聽聽聽聽聽聽
synchronized (Singleton. class ){
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
if (uniqueInstance == null ){
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽uniqueInstance聽
= new 聽Singleton();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽}聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽
return 聽uniqueInstance;聽
聽聽聽聽}

}

1. private constructor
2. static getInstance
3. syncronized..waste a lot of time
4. double check..modified syncronize, so time-waste might occurs only when first time the instance construct


Jedi 2006-07-09 12:42 鍙戣〃璇勮
]]>
What's the JRE means (zz)http://www.tkk7.com/jedikings/archive/2006/06/24/54810.htmlJediJediFri, 23 Jun 2006 19:26:00 GMThttp://www.tkk7.com/jedikings/archive/2006/06/24/54810.htmlhttp://www.tkk7.com/jedikings/comments/54810.htmlhttp://www.tkk7.com/jedikings/archive/2006/06/24/54810.html#Feedback1http://www.tkk7.com/jedikings/comments/commentRss/54810.htmlhttp://www.tkk7.com/jedikings/services/trackbacks/54810.html http://www.newsmth.net/bbscon.php?bid=756&id=53934

浠ユ垜鐨勬満鍣ㄤ負渚?br />鎴戝緱jdk瑁呭湪浜?br />C:\Program Files\Java\jdk1.5.0_06
瀹夎榪欎釜jdk鐨勬椂鍊欙紝瀹冭姹傛垜瀹夎jre錛屾垜涔熼夋嫨瑁呬簡錛岃鍦ㄤ簡
C:\Program Files\Java\jre1.5.0_06

鐒跺悗聽 C:\Program Files\Java\jdk1.5.0_06\ 鐩綍涓嬫湁涓猨re鐩綍
灝辨槸瀛樺湪聽 C:\Program Files\Java\jdk1.5.0_06\jre聽 榪欎箞涓涓猨re

C:\Program Files\Java\jre1.5.0_06聽 鎴戜滑鍙畠 jre a
C:\Program Files\Java\jdk1.5.0_06\jre聽 鎴戜滑鍙畠 jre b

騫沖父鎵璇寸殑jre鏄寚聽 榪欓噷鐨刯re a錛屽畠鏄負浜嗚浣犵殑鏈哄櫒鍙互榪愯 java紼嬪簭鐨?br />鍙兘榪愯錛屼笉鑳藉紑鍙戯紝鍥犱負娌℃湁javac
榪欎釜jre鍙互鍗曠嫭瀹夎錛岀増鏈竴鏍風殑璇濋兘涓鏍鳳紙鏍規嵁licene錛屽ソ璞$洰鍓嶄笉鍏佽鍓錛?/p>

jre b 鏄殢jdk鐨勶紝涓嶈兘涓嶈錛屽洜涓郝?jdk>jre聽 jdk涔熼渶瑕乯re鍟?br />灝辨槸瑁卝dk灝變細鍑虹幇榪欎釜jre b

涓鐐歸珮綰х殑錛宩rea 鍜?jreb鏈変粈涔堜笉鍚?br />
jreb 鏄負jdk鏈嶅姟鐨勶紝瀹冩湁jrea鐨勫叏閮ㄥ姛鑳斤紝鍚屾椂涓轟簡jdk鏈嶅姟錛屽畠鐨勭被搴擄紝姣旀柟璇磖t.jar
錛屽涓浜涜皟璇曚俊鎭紝鍥犱負寮鍙慾ava紼嬪簭錛屼細璋冭瘯鍟婏紝鐢╦rea娌″姙娉曡皟璇曪紝姣旀柟璇翠笉鑳芥柇鐐瑰埌
聽鍩虹綾誨簱閲岄潰
鐪媕rea鍜宐鐨剅t.jar 澶у皬涓嶄竴鏍鳳紝jreb鐨勫ぇ涓浜涳紝甯︽湁璋冭瘯淇℃伅錛堜富瑕佹槸class閲岀殑
LineNumberTable) ,鎵浠ヨ繍琛屾椂錛宩reb鐨勯熷害鎴栬呰澆鍏ラ熷害闅懼厤鎱竴浜涳紝鎴栬呰錛岀敤jdk榪?br />琛宩ava紼嬪簭姣攋re榪愯鎱竴浜涳紝铏界劧浣犳劅瑙変笉鍒幫紝鑷沖皯class灝哄涓婁笉涓鏍?/p>



Jedi 2006-06-24 03:26 鍙戣〃璇勮
]]>
Reading note of "Head First Design Patterns": Strategy Patternhttp://www.tkk7.com/jedikings/archive/2006/06/13/52422.htmlJediJediTue, 13 Jun 2006 04:42:00 GMThttp://www.tkk7.com/jedikings/archive/2006/06/13/52422.htmlhttp://www.tkk7.com/jedikings/comments/52422.htmlhttp://www.tkk7.com/jedikings/archive/2006/06/13/52422.html#Feedback0http://www.tkk7.com/jedikings/comments/commentRss/52422.htmlhttp://www.tkk7.com/jedikings/services/trackbacks/52422.html聽聽聽Joe's company聽makes a duck pond simulation game, SimUDuck, The game can show a large variety of duck species swimming and making quacking sounds.

Initial Design:
diagram.JPG
But now some new functionality should be added, for example: we need some of the ducks to FLY.

First Design:
聽聽聽We add a method fly() into the Duck class. It seems worked, but something went horribly wrong because not all ducks can fly. so....

Second Design:聽Using inheritance and polymorphism
聽聽聽Always override the fly() mehtod in the subclass where needed.

test.JPG
聽聽聽

聽聽聽Drawbacks:聽Everytime a new duck is added, you will be forced to look at and possibly override fly() and quack(). so is there a cleaner way of having only some of the duck types fly or quack?

Third Design: Using interface!
聽聽聽test1.JPG
Drawbacks: It completely destroy code reuse for those behaviors.

1. Design Principles: Identify the aspects of your application that vary and separate them form what stays the same!
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 which means Encapsulate the parts that vary!
2. Design Principles: Program to an interface, not an implementation! (interface here means supertype! including interface
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽and abstract class!.. making use of the polymorphism functionality).
3. Design聽Principles:聽Favor composition over interface!

Strategy Pattern: Using Composition!
test2.JPG

Code implement:
FlyBehavior.java
publicinterface聽FlyBehavior{
聽聽聽
publicvoid聽fly();
}

FlyWithWings.java
publicclass聽FlyWithWings聽implements聽FlyBehavior{
聽聽聽
publicvoid聽fly(){
聽聽聽聽聽聽System.out.println(
"I'm聽flying!!");
聽聽聽}

}

FlyNoWay.java
publicclass聽FlyNoWay聽implements聽FlyBehavior{
聽聽聽
publicvoid聽fly(){
聽聽聽聽聽聽System.out.println(
"I聽can't聽fly");
聽聽聽}

}

Duck.java
publicabstractclass聽Duck{
聽聽聽FlyBehavior聽flyBehavior;
聽聽聽
public聽Duck(){聽聽聽聽聽聽
聽聽聽}

聽聽聽
聽聽聽
publicabstractvoid聽display();
聽聽聽
聽聽聽
publicvoid聽performFly(){
聽聽聽聽聽聽flyBehavior.fly();
聽聽聽}

聽聽聽
聽聽聽
publicvoid聽swim(){
聽聽聽聽聽聽System.out.println(
"All聽ducks聽float,聽even聽decoys!");
聽聽聽}

}

MallardDuck.java
publicclass聽MallardDuck{
聽聽聽
public聽MallardDuck(){
聽聽聽聽聽聽flyBehavior
=new聽FlyWithWings();聽聽聽聽聽聽
聽聽聽}

聽聽聽
聽聽聽
publicvoid聽display(){
聽聽聽聽聽聽System.out.println(
"I'm聽a聽real聽mallard聽duck");
聽聽聽}

}

The Definition聽of Strategy Pattern:聽The聽Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them intercahgeable. Strategy lets the algorithm vary indepanedtl from client聽that use it

Problems:
1. It's weird to have a class that's jast a behavior: classes represent things both have state and methods. a flying behavior might have instance variables representing the attributes for the flying behavior.
2.聽Be care聽of聽Over-Design: implement your code first, then refractoring!



Jedi 2006-06-13 12:42 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 有色视频在线观看免费高清在线直播| 亚洲精品无码久久千人斩| 免费电视剧在线观看| 黄色成人免费网站| 亚欧人成精品免费观看| 免费在线视频你懂的| 亚洲三级高清免费| 野花高清在线观看免费3中文 | 污污视频免费观看网站| 日韩亚洲人成在线综合| 污视频网站免费观看| gogo免费在线观看| 大地资源在线资源免费观看| 国产精品免费看久久久| 中文字幕免费在线| 免费a级毛片无码a∨蜜芽试看| 成人免费无码大片a毛片| 免费在线一级毛片| 亚洲免费人成在线视频观看| 久久亚洲成a人片| 亚洲大香人伊一本线| 亚洲色大网站WWW永久网站| 国产精品久久亚洲一区二区| 人妻免费久久久久久久了| a级毛片高清免费视频就| 999久久久免费精品播放| 永久免费av无码不卡在线观看| 日韩精品无码人妻免费视频| 亚洲国产精品毛片av不卡在线| 国产亚洲无线码一区二区| 久久亚洲美女精品国产精品| 国产99在线|亚洲| 香蕉97碰碰视频免费| 久久久久久免费一区二区三区| 亚洲一区二区高清| 亚洲av无码国产精品夜色午夜| 亚洲精品在线免费看| 亚洲GV天堂无码男同在线观看| 亚洲黄片手机免费观看| 中文毛片无遮挡高潮免费| 免费国产在线观看|