Hi,
i have a small problem with the getObjectByQuery method. For some reason the
method does not return the object that i expect. actually i works only the
first time,
the second, third etc. times, it does not work anymore (i only get a empty
object).
my code looks like
PersistenceBroker broker =
PersistenceBrokerFactory.defaultPersistenceBroker ();
broker.beginTransaction ();
Criteria crit = new Criteria ();
crit.addEqualTo ("orderid", new Long (form.getId ()));
Query query = new QueryByCriteria (OrderObject.class, crit);
OrderObject order = (OrderObject) broker.getObjectByQuery (query);
// broker.clearCache ();
broker.close ();
what i found out is that :
code does not work properly when i remove the broker.clearCache () method.
however
it works fine if i add the clearCache line, but this is no proper sultions i
think. so what
is wrong with my code ? why does the broker not find my object with the same
id when
i look for it the second time ?
btw. i have two more questions :
is there a way to get the number of currently idle and currently open db
connections ?
Thanks in advance,
Andreas
--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualit�tssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]