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

          2006年8月15日

          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 閱讀(1120) | 評(píng)論 (0)編輯 收藏

          1. 某個(gè)service的參數(shù)有復(fù)雜對(duì)象時(shí),如果要用默認(rèn)的beanmapping,記得這個(gè)對(duì)象要有的默認(rèn)構(gòu)造器(空參數(shù)構(gòu)造器),不然Axis在處理的時(shí)候會(huì)所有的字段都是同一個(gè)值..至于原因我沒(méi)搞清楚-,-~~
          2. 不要用List,盡量用數(shù)組!
          ValueBean[]?getValues()?
          ????
          {?
          ????????ArrayList?result?
          =?new?ArrayList();?
          ????????
          return?(ValueBean[])?result.toArray();?
          ????}
          上面的代碼還是會(huì)出問(wèn)題,要用iterator一個(gè)一個(gè)map過(guò)去
          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 閱讀(278) | 評(píng)論 (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 閱讀(247) | 評(píng)論 (0)編輯 收藏

          主站蜘蛛池模板: 杨浦区| 云南省| 井冈山市| 苏尼特右旗| 青龙| 建水县| 汝南县| 新竹县| 镇赉县| 永城市| 鄯善县| 广平县| 万州区| 武山县| 郴州市| 新邵县| 玉林市| 延津县| 内乡县| 宁海县| 咸丰县| 宁国市| 汾阳市| 鲁甸县| 河池市| 左云县| 西安市| 望城县| 康乐县| 荆门市| 白水县| 大冶市| 普安县| 天镇县| 肥城市| 广安市| 阜城县| 平湖市| 宁都县| 雅江县| 深水埗区|