Hi,
We are using CMR with JBoss 3.02. This works quite fine, but the Container is generating a sql statement we really don't know
why this is done. The problem is,that this single sql statement is very time consuming and completly useless!!
It occurs before every insert or update on a cmr field of a entitybean using cmp with cmr.
Does someone have any idea what the hell is going on here?
Is there a way to get rid of this "feature"? Why is this sql statement generated?
e.g.: There are twe entity beans TermLogBean and TermLanguageBean with a N:1 relationship.
We are doing the following in a SessionBean:
TermLogLocale termLogLocale;
TermLanguageLocale termLanguageLocale;
...
termLogLocale.setTermLanguage(termLanguageLocale); //set the cmr field termlanguage
...
JBoss CMP generates this statement (We traced the logging messages with Chainsaw):
in org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.TermLanguage
Executing SQL: SELECT TERM_LOG_ID FROM TERM_LOG WHERE (TERM_LOG_LANGUAGE_CODE=?)
To execute this statement takes about 2 seconds !!
This is done - as I mentioned above - before every insert or update. Imagine 1000 inserts.....
Is this a normal behavior?
Stefan