-
1. Re: Useful tip to improve CMP performance
fbiaggi Apr 13, 2003 4:09 AM (in response to deepak3000)I think you are using an old version of JBoss, in 3.0.6 I do not see this behaviour...
-
2. Re: Useful tip to improve CMP performance
deepak3000 Apr 13, 2003 2:04 PM (in response to deepak3000)Actuall this code exists in
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand
too. I am using jboss 3.0.6 too. I did read some place that the source code is completely not in sync but I do beleive this is happening in the 3.0.6 release. I verified
our code too to make sure we are'nt doing a select count(*). -
3. Re: Useful tip to improve CMP performance
raja05 Apr 15, 2003 5:15 PM (in response to deepak3000)The Spec Demands that the DuplicateKeyException be thrown for Duplicate primary keys. Try setting an index on the id column, That may help a bit!!
-Raj -
4. Re: Useful tip to improve CMP performance
yosarian1 May 16, 2003 4:46 AM (in response to deepak3000)Yes it's possible that there is no phisical Primary key/unique index for the EJB primary key (or the persistence layer don't support primary keys) and then we have to check for duplicates in code. But why don't we use a switch for this. I think it should be an Entitybean switch that makes Jboss check the duplicates.
yosarian@freemail.hu -
5. Re: Useful tip to improve CMP performance
bleupen May 28, 2003 8:45 AM (in response to deepak3000)we saw this phenomenon too. they added a work-around in JBoss 3.21 that addresses this. if you can upgrade, go ahead and get 3.21 and configure standardjbosscmp-jdbc.xml to use the "no-select-before-insert" entity command.
b -
6. Re: Useful tip to improve CMP performance
nbirch Jun 19, 2003 11:37 AM (in response to deepak3000)Hi,
I'd like to stop these SELECTS but I'm not sure how to enable the no-select-before-insert command. Is this described in the for-pay docs?
Do I remove the "default" command above it in the standardjbosscmp-jdbc.xml file? Or do I have to create a jbosscmp-jdbc.xml somewhere and edit that?
Please advise.
Thanks
NBirch -
7. Re: Useful tip to improve CMP performance
bleupen Jun 19, 2003 4:50 PM (in response to deepak3000)nbirch,
you can change it in the standardjbosscmp-jdbc.xml file.
simply replace the following line in the "defaults" section:
<entity-command name="default"/>
with this line:
<entity-command name="no-select-before-insert"/>
hope that helps
cheers!
b -
8. Re: Useful tip to improve CMP performance
nbirch Jun 24, 2003 6:20 PM (in response to deepak3000)Hi,
I tried using this entity command but I still get the SELECT before my INSERT. Is there anything else I should check?
Thanks
NBirch -
9. Re: Useful tip to improve CMP performance
adrian.brock Jun 25, 2003 6:59 AM (in response to deepak3000)The configuration was wrong in 3.2.1
It should be:
<!-- variation on default that skips select before insert -->
<entity-command name="no-select-before-insert"
class="org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand">
jboss.jdbc:service=SQLExceptionProcessor</a
ttribute>
</entity-command>
Regards,
Adrian -
10. Re: Useful tip to improve CMP performance
nbirch Jun 25, 2003 11:24 AM (in response to deepak3000)Hi,
Thanks for responding. Unfortunately my xml file contains this exact configuration. I specified this command up in the defaults section.
The bean represented by the table does have its primary key field defined. and I checked the actual table (in Postgres) and it shows an index on that column.
Can you think of anything else to look at?
Thanks,
NBirch -
11. Re: Useful tip to improve CMP performance
adrian.brock Jun 25, 2003 12:04 PM (in response to deepak3000)Is this MBean deployed?
jboss.jdbc:service=SQLExceptionProcessor
Regards,
Adrian -
12. Re: Useful tip to improve CMP performance
nbirch Jun 25, 2003 1:43 PM (in response to deepak3000)I checked the server.log file and that MBean is not mentioned, so I assume it was not deployed.
I see the Mbean defined in the deploy/sqlexception-service.xml file. Does it need to be specified in the jboss-service.xml file? If so could you let me know how to do that?
Thanks,
NBirch