On Wednesday, October 1, 2003, at 11:36 PM, Milen Dyankov wrote:

Matthew Hixson wrote:
Sorry, I should have said JBossQL rather than EJB-QL. If you're not using xdoclet you can specify a JBossQL query in jbosscmp-jdbc.xml like so:
<query>
<description><![CDATA[find all content in an invoice]]></description>
<query-method>
<method-name>findAll</method-name>
<method-params>
</method-params>
</query-method>
<jboss-ql><![CDATA[select object(o) from v_invoice_contents as o order by o.invoiceContentId]]></jboss-ql>
</query>
If you are using xdoclet specify this in your bean:
* @ejb.finder
* signature="java.util.Collection findAll()"
* query="select object(o) from v_invoice_contents as o order by o.invoiceContentId"
* @jboss.query
* description="find all content in an invoice"
* signature="java.util.Collection findAll()"
* query="select object(o) from v_invoice_contents as o order by o.invoiceContentId"
-M@

10x M@,


I could actually go ahead and use JBossQL rather than EJB-QL.

The thing is that my manager wouldn't like that. We are supposed to write
code that is easy to move to another application server when and if
there is such need.


I do not have experience with other servers. If most of them have own QL,
at least as powerful as JBossQL, than I could try to push the idea of using
JBoss-QL.

I think a lot of people have found vanilla EJB-QL to be lacking so many needed features (such as order by) that nearly everyone is using an application server specific query syntax. I'd say 9 out of 10 of my finders make use of JBossQL.
We just migrated our webapp from Resin to JBoss. Both of them extend EJB-QL. So its not impossible to move from one application server to another.
-M@




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to