I'm getting puzzled by what appears to be erratic behaviour in finders.

I have an application that manages JMS test sets. A lot of the test sets
double up, so I want to be able to find an existing test layout which
matches the one I want to do and use that. Similarly, when I've run a test,
I want to associate the results with all those layouts that match the
resulting test.

I'm using CMP entity beans to model the test set (group of tests) -> test
layout (abstract single test) -> test config (exact test configuration) ->
results structure for a specific JMS provider. I'm using an MS Access
database with a JDataConnect JDBC driver (single connection). I have
<tuned-updates>true</tuned-updates> -- I'm doing a lot of querying, so I'd
hate to have to save each entity bean back to the database every time I get
a value.

When creating lists of test layouts to conform to a set, I'll do a series of
findOrCreate operations that checks to see if there is an exisiting test
layout that matches the required layout and uses that layout where possible.
Otherwise a new layout gets created. Since I might want to resue the same --
newly minted -- layout in the test set again, I need to be able to find the
just created layout. This seems to work only erraticly; I've "solved" it by
implementing my own look-up table, rather than using finders.

The next stage comes when trying to find existing results sets for layouts
that are about to be run. I'm looking to see whether I can find a matching
set of test results for a given JMS provider. This sometimes seems to return
the wrong results set, leading to odd-looking reports. Clearing the lookup
and re-running often ends up with the correct results being found.

Both the test layout creation and results lookup use stateless session
beans, with <session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>. 

I also lookup the set-layout-results links directly using a finder in a
method on the test set entity bean to return the links list; this also seems
to sometimes return incorrect results, with two queries returning different
lists of links.

I'm new to EJB, so my understanding of what's happening in finders is
limited. The finders look like they only find stuff that has been saved to
the database. Is it possible to have created beans that are "unfindable"?

Doug Palmer

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

Reply via email to