You can turn on CMP logging to see what it is sending to the database by adding this to your server/default/conf/log4j.xml:
| <!-- View CMP queries --> | <category name="org.jboss.ejb.plugins.cmp"> | <priority value="DEBUG"/> | </category> | As for how to implement sequence numbers in Oracle, I'm not sure how to set it up to get CMP to automatically do it. Here's a variation of the method I use that uses Oracle sequence objects: - Create sequence controller session bean. - Implement getNextVal and other sequence related methods. - Have it, based on the parameter you pass, do a JDBC call to select the next value from a sequence object. - Have your onCreate CMP methods call the sequence controller and set the primary key value. - Develop the sequence controller to use "caching" for optimal performance. Create or alter your sequence objects to jump a specified interval. We had ours increment the sequence object by 100. This had the effect of "caching" 100 sequence values. Thus, the sequence controller would still return an increment of 1 to your CMP bean, but would only call the database to obtain the "nextval" from the sequence object every 100th time. This increased performance dramatically, particularly during large quantities of inserts, which was typical of our system. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836591#3836591 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3836591 ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user