-
1. Re: findAll does not return every record
dsundstrom Aug 8, 2002 6:59 PM (in response to thy_ngon_tran)Have you turned on DEBUG for the org.jboss.ejb.plugins.cmp category in the log4j.xml configuration file?
When you do you will see the SQL executed for the findAll command. What is the this SQL?
Also, have you upgraded to 3.0.1 final release? -
2. Re: findAll does not return every record
thy_ngon_tran Aug 9, 2002 12:36 AM (in response to thy_ngon_tran)
2002-08-08 23:41:54,274 INFO [STDOUT] PartInventorySessionBean.ejbCreate()
2002-08-08 23:41:54,574 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindAllQuery.enterprise/PartInventoryEntity.findAll] Executing SQL: SELECT Id FROM PartInventory
2002-08-08 23:41:54,704 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.enterprise/PartInventoryEntity] Executing SQL: SELECT Id,PartName, Description, Type, Account, OnHand, Price FROM PartInventory WHERE (Id=?) OR (Id=?) OR (Id=?)
2002-08-08 23:41:54,774 INFO [STDOUT] TTTT:ejb/enterprise/PartInventoryEntity:[.3.]
=========================================================
Why does it ask repeatly for Id=? or Id=? or Id=?
The jaws.xml looks fine.
What is wrong? -
3. Re: findAll does not return every record
dsundstrom Aug 9, 2002 1:17 PM (in response to thy_ngon_tran)That is the load query. The finder is correct in executing this:
SQL: SELECT Id FROM PartInventory
JBossCMP does not use the jaws.xml file; it uses the jbosscmp-jdbc.xml file. I suggest you read the quick start guide available on our download page at source forge. -
4. Re: findAll does not return every record
thy_ngon_tran Aug 9, 2002 2:29 PM (in response to thy_ngon_tran)
Thanks, D!
I found what is wrong with it. It is in the code. It actually skip every other record.
Regarding multiple of OR in WHERE clause, the CMP first select id (primary key) and then select again for each id. So, the number of OR depends on the number of records. Why the implementation does not use select * from table instead of query the table twice?
ThyNgon -
5. Re: findAll does not return every record
dsundstrom Aug 10, 2002 12:28 PM (in response to thy_ngon_tran)It can. You just don't have it configured that way. For a lot of applications selection all the column from all the rows will cause the application to run out of memory. The configuration of optimized loading is covered in chaper 6 of the JBossCMP documentation.
-
6. Re: findAll does not return every record
camus Aug 12, 2002 12:23 AM (in response to thy_ngon_tran)Hi,
Could you tell me where to download the upgraded 3.0.1 final release version ?
Thx.