<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 7, comments - 1, trackbacks - 0, articles - 0

    2006年7月9日

    1. 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>

    posted @ 2006-09-01 08:55 Jedi 閱讀(1118) | 評論 (0)編輯 收藏

    1. 某個service的參數(shù)有復雜對象時,如果要用默認的beanmapping,記得這個對象要有的默認構(gòu)造器(空參數(shù)構(gòu)造器),不然Axis在處理的時候會所有的字段都是同一個值..至于原因我沒搞清楚-,-~~
    2. 不要用List,盡量用數(shù)組!
    ValueBean[]?getValues()?
    ????
    {?
    ????????ArrayList?result?
    =?new?ArrayList();?
    ????????
    return?(ValueBean[])?result.toArray();?
    ????}
    上面的代碼還是會出問題,要用iterator一個一個map過去
    public?class?ValueHelper?
    ????
    {?
    ????????
    public?static?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. 要生成符合ws-i的web service最好用document/literal
    <service name="MyWebRes" provider="java:RPC" style="document "use="literal">

    posted @ 2006-08-15 09:22 Jedi 閱讀(275) | 評論 (0)編輯 收藏

    http://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

    posted @ 2006-08-15 09:15 Jedi 閱讀(245) | 評論 (0)編輯 收藏

    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里面改一下
    <parameter name="sendMultiRefs" value="false"/>

    ie下的話也有一個webservice.htc,沒仔細研究過..

    posted @ 2006-07-11 12:13 Jedi 閱讀(842) | 評論 (0)編輯 收藏

    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

    posted @ 2006-07-09 12:42 Jedi 閱讀(301) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 亚洲欧美日韩中文字幕在线一区| 久久久久久亚洲精品| 2020年亚洲天天爽天天噜| 一级毛片**不卡免费播| 亚洲av无码一区二区三区网站| 一级有奶水毛片免费看| 一区国严二区亚洲三区| 黄色三级三级三级免费看| 国产av无码专区亚洲国产精品 | 亚洲香蕉在线观看| 嘿嘿嘿视频免费网站在线观看| 亚洲色图黄色小说| 57PAO成人国产永久免费视频 | 亚洲色图在线观看| 在免费jizzjizz在线播| 亚洲综合免费视频| 成年人免费网站在线观看| 国产AV无码专区亚洲AV麻豆丫| 亚洲AⅤ无码一区二区三区在线| 一级片在线免费看| 亚洲人成77777在线播放网站| 久久精品视频免费看| 亚洲人成网站色在线观看| 四虎影视在线永久免费看黄| 人人爽人人爽人人片A免费| 国产亚洲成av人片在线观看| 最近免费mv在线电影| 亚洲精品乱码久久久久久V| 亚洲国产V高清在线观看| 男人的天堂网免费网站| 亚洲天堂免费在线| 亚洲国产精品尤物yw在线 | ww在线观视频免费观看w| 久久水蜜桃亚洲av无码精品麻豆| 日韩精品福利片午夜免费观着| 国产综合成人亚洲区| 亚洲乱码国产一区三区| 无码少妇一区二区浪潮免费| 曰批免费视频播放免费| 91亚洲导航深夜福利| 国产一级高清视频免费看|