As far as I can remember, there was a message on the mailing list earlier
this week saying that Jaws does not support ASC or DESC yet.

Peter

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Robert Schulz
Sent: Thursday, November 23, 2000 9:26 AM
To: 'jBoss'
Subject: RE: [jBoss-User] a bunch of CMP finder method questions


Wow - very quick response time - thanks.

If this is spec compliance, than compliant apps are not going to work.
We develop and deploy a server side Java web app here and the two things
which are a problem are
- memory foot print per users (can't say any thing about jBoss here yet,
  but will get around to it whilst evaluating)
- load on the database (generated by code generated queries)
and we generate way less queries. Anyway, will try the "tuning params".
Maybe something like a C++ "const" in the deployment descriptor would help.

> Yes, you are doing stuff wrong :-)

Good - at least there is hope ;)

> ... The proper way is to either use a bulk data
> accessor in the bean, or use a session which extracts the data in one
> call. This is the main problem with your code.

I can see how this cuts back calls, but from an OO point of view it, err,
is not very nice. Maybe the session bean approach might help (but I not
that far yet - maybe tomorrow ;-)

> > 2) Complex Finder Problem
> > -------------------------
> Don't follow. What is the problem?

OK - in more detail: In my home interface I declared:

code: public Collection findCapacityAndName(int capacity, String name)
code:                                       throws RemoteException,
FinderException;

ie, a non "standard" find method ( findByXYZ and findAll work ok). In the
documentation
of jBoss on the website is a page called "Customizing JAWS" and there is a
section called
"Declaring Finders" which explains how to setup a finder with WHERE and
ORDER in jaws.xml
This is my shot at it:

<jaws>
  <enterprise-beans>
    <entity>
      <ejb-name>ShipBean</ejb-name>
      <finder>
        <name>findCapacityAndName</name>
        <query>capacity = {0} AND name = {1}</query>
        <order>name DESC</order>
      </finder>
    </entity>
  </enterprise-beans>
</jaws>

Now, when calling the method in the client an exception is throw, which
stems from the
database not understanding the SQL created:

query: SELECT id,name DESC FROM ShipBean WHERE capacity = 3000 AND name =
'Utopia' ORDER BY name DESC
                      ~~~~~~~~~~~~
The WHERE and ORDER clause are built correctly from what I speced in
jaws.xml, but the SELECT bit is
stuffed.

Any ideas anyone?

Cheers,


Robert.



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to