• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Configuration

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using orion1.5 .
Can anyone please tell me what configuration i have to do for the finder methods in ejb-jar.xml
and orion-ejb-jar.xml
I recognized 2 ways while studying -
1)
in the <entity> tag of ejb-jar.xml add
<query>
<query-method>
<method-name>findByEmployeeName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(k) FROM Employee AS k WHERE k.ename=?1
</ejb-ql>
</query>
and no mapping in orion-ejb-jar.xml
2)
in <entity> tag of ejb-jar.xml add
<query>
<query-method>
<method-name>findByEmployeeName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql></ejb-ql>
</query>

and in <entity-deployments> tag of orion-ejb-jar.xml

<finder-method query="$ename = $1">
<method>
<ejb-name>Employee</ejb-name>
<method-name>findByEmployeeName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method>
</finder-method>

which is the correct one?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic