• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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?
 
Destiny's powerful hand has made the bed of my future. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic