在可视化界面中编辑,在编辑find方法时可编辑ejb_ql

解决方案 »

  1.   

    一种方法:选中EJB DD Source,直接编辑ejb-jar.xml中对应的ejb-ql如:
                <query>
                    <query-method>
                        <method-name>findByBookName</method-name>
                        <method-params>
                            <method-param>java.lang.String</method-param>
                        </method-params>
                    </query-method>
                    <ejb-ql>select object(b) from Example b</ejb-ql>
                </query>另一个方法:直接在EJB Designer中编辑需要ejb-ql的finder和selecter。
      

  2.   

    <query>
                    <query-method>
                        <method-name>findByName</method-name>
                        <method-params>
                            <method-param>java.lang.String</method-param>
                        </method-params>
                    </query-method>
                    <ejb-ql>select object(o) from Product o</ejb-ql>
                </query>