如何在jaws.xml文件中定义finder方法??定义后报错,大家看看我那块写错了。谢谢!

03-07-03 bluegirl
jaws.xml文件如下:

<jaws>
	<datasource>java:/DB2DS</datasource>
	<type-mapping>DB2</type-mapping>
       <debug>true</debug>


    <enterprise-beans>
        <entity>
            <ejb-name>ProtonAccount</ejb-name>            
            <table-name>protonaccount</table-name>
            <cmp-field>
                <field-name>account_number</field-name>
                <column-name>account_number</column-name>
            </cmp-field>
            <cmp-field>
                <field-name>customer_name</field-name>
                <column-name>customer_name</column-name>
            </cmp-field>
            <cmp-field>
                <field-name>balance</field-name>
                <column-name>balance</column-name>
            </cmp-field>   
               <finder>
                <name>findByID</name>
                <query>protonaccount WHERE protonaccount.account_number={0}</query>

                <order></order>
           </finder>
           <finder>
                <name>findAllAcounts</name>                         
                        <query />
                <order/>         
           </finder>
                        
        </entity>
    </enterprise-beans>
</jaws>
<p>

调用这个实体bean后报错如下:

error getting the accountsUnknown query: public abstract java.util.Collection com.bank.ProtonAccountHome.findAllAccounts() throws javax.ejb.FinderException,java.rmi.RemoteException 

猜你喜欢