2 Replies Latest reply on Oct 16, 2003 9:02 PM by steven.tian

    DynamicQL & packing arguments

    Erez Efrati Newbie

      I have seen the sample of how to use the DynamicQL in the CMP docs, and I still can't figure out why is it so important to pack the ?1,2... arguements in an Object Array and pass it to the ejbSelectGeneric (String, Object[]), rather than just plant actual values in the request statement string and pass the query string with an empty arguemets object array.

      In other words, a DynamicQL serves the need for a querty request that is not *staticly* known beforehand and one that most probably keeps changing on each invocation. As I understand it, planting ?1,2,.. in a query statement worths only if the query is compiled, cached somehow, and repeated with different values. What is the good in doing so with DynamicQL query when it keeps changing?

      (By the way I am using JBoss 3.2.1)

      Thanks in advance,
      Erez