I need to dynamically invoke user-specified queries. I thought I could use Dynamic JBoss-QL for this, but couldn't find any single "getting started" example on that subject. Hence I have declared a BMP-style finder called ejbFindWithSqlQuery (String query), which is allowed by JBoss but not by the EJB specs. But I get strange exceptions with this mechanism that tell me that the bean with the primary key thus retrieved doesn't exist. For now, I can safely ignore these messages, but I'd better find out a better way to handle the situation. I'm guessing now that the JBossQL system would handle the problem more safely, but I still need a working snippet to show me how to do it.
Can anybody help ?
Thx in advance,
I forgot to mention that the beans' persistence is container managed (which is why the BMP finder are not so good an option). I'm using JBoss 3.x too, Mysql, SuSE linux,...