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 阅读(1101) | 评论 (0)编辑 收藏

1. 某个service的参数有复杂对象时,如果要用默认的beanmapping,记得这个对象要有的默认构造器(空参数构造器),不然Axis在处理的时候会所有的字段都是同一个值..至于原因我没搞清楚-,-~~
2. 不要用List,尽量用数组!
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 阅读(258) | 评论 (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 阅读(231) | 评论 (0)编辑 收藏