Hi,

I was wondering if people could give me some pointers in relation to custom
finders in JBoss 3.0.0beta2.

The query I want to implement is:

SELECT member_fk FROM member_dialog_cluster GROUP BY member_fk HAVING COUNT
(member_fk) > 5;
(i.e. to select all members from member_dialog_cluster where their entry
occurs more than 5 times.)

Having looked at the various options, I have some queries.

1)      In terms of implementing the finder method in code:
        a) Do I need to manually make a DB connection, or can I use one of
the pooled connections. If so, how to I get access to this connection?
        
        b) I want to return a Set of member local objects to the user. The
sql call retrieves a list of primary keys from the DB. Will the container
map these for me, or will I have to do a findByPrimaryKey on each PK...
(gulp! Hope not!)

2)      In terms of implementing this method in jbosscmp-jdbc.xml, how do I
do it?
        i.e. declared-sql seems unsuitable because I am not using WHERE and
I'm not exactly sure what to place in the query.
      <query>
        <description>Get member's with low queue</description>
        <query-method>
          <method-name>ejbFindByQueueState</method-name>
          <method-params/>
        </query-method>
                ???
      </query>
    </entity>

3)      Overall... what is the suggested way of doing this?
        - I would ideally like the code to be as portable as possible, for
comparing performance to other app servers with minimal code changes. 

        - I want to keep the code manageable i.e. steering clear of BMPs
would be nice.

4)      I don't suppose ejb-ql might be refined some time to help with this
call? Might jboss-ql help?

Many thanks,

Tim

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to