-
1. Re: Can't get "no-select-before-insert" to work
lafr Jul 9, 2003 3:28 PM (in response to nbirch)"no-select-before-insert" works for me and improved the performance of my app.
In server.log I also only see "Starting" and "Deployed". -
2. Re: Can't get "no-select-before-insert" to work
samart Jul 9, 2003 5:20 PM (in response to nbirch)at the top of my jbosscmp-jdbc, i have a defaults section. try that.
<jbosscmp-jdbc>
java:/Mydb
<datasource-mapping>Sybase</datasource-mapping>
<entity-command name="no-select-before-insert"/>
<enterprise-beans>... -
3. Re: Can't get "no-select-before-insert" to work
nbirch Jul 10, 2003 10:29 AM (in response to nbirch)I put the <entity-command name= "no-select-before-insert/> in the defaults section of the "standardjbosscmp-jdbc.xml" file.
I don't have a jbosscmp-jdbc.xml file.
Could this be the problem?
Where should a jbosscmp-jdbc.xml be located, and what should its format be? IS it just overrides from the 'standard', like jboss.xml is to standardjboss.xml?
Thanks,
Nbirch -
4. Re: Can't get "no-select-before-insert" to work
samart Jul 10, 2003 12:41 PM (in response to nbirch)i dont know if not having jbosscmp-jdbc.xml is the problem. i woudl assume that if you edited standardjbosscmp-jdbc.xml, it shoudl work.
if you dont have a jbosscmp-jdbc.xml (for each ejb.jar), then jboss uses all the defaults. in this file, you specify the field column mappings (so you have control), tabel creation, table names, relationship mappings, as well as override standardjbosscmp-jdbc.xml settings, etc.
this might sound stupid, but are you sure you are editing the right standardjbosscmp-jdbc.xml (in the active instance directory?) e.g...the file for 'defaults', and not the one for 'all'? -
5. Re: Can't get "no-select-before-insert" to work
samart Jul 10, 2003 12:43 PM (in response to nbirch)the dtd for jbosscmp-jdbc.xml is in the docs/dtd dir. also, dishing out $10 for the docs, may be useful. i dont see how i coudl use cmp pain free without the docs.
-
6. Re: Can't get "no-select-before-insert" to work
nbirch Jul 10, 2003 1:53 PM (in response to nbirch)I'm definately using the right standardjbosscmp-jdbc.xml file. So maybe its not a config problem?
Could it be somthing about the INSERT or the Table I'm inserting into? Does the primary key field value need to be first in the INSERT statement arg list?
Thanks
NBirch -
7. Re: Can't get "no-select-before-insert" to work
samart Jul 10, 2003 3:18 PM (in response to nbirch)No, the parameter order doesnt matter. typically, the container will create the row (insert) with the pk, then do an update (update) for all other bean values. (inefficient yes..but i dont know whats best, i've never tried to wire a cmp engine)
try making a minimal jbosscmp-jdbc.xml file like below. just place it next to your ejb-jar.xml in your jar/ear. if this doesnt work...sorry dude...i dunno. i just did this yesterday (disabled select before insert), and it worked for me. jb3.2.1. good luck..gotta get back to my behind schedule project! :)
<?xml version="1.0" encoding="UTF-8"?>
<jbosscmp-jdbc>
java:/PRSdb
<datasource-mapping>Sybase</datasource-mapping>
<entity-command name="no-select-before-insert"/>
</jbosscmp-jdbc> -
8. Re: Can't get "no-select-before-insert" to work
nbirch Jul 11, 2003 5:44 PM (in response to nbirch)
Thanks for the suggestion. I tried the minimal jbosscmp-jdbc.xml file idea, but it still gives me the SELECT before the INSERT. I'm wondering if this is a feature that only works for EJB2.0 beans? I'm still using EJB1.1.
Thanks again,
Nbirch -
9. Re: Can't get "no-select-before-insert" to work
fbiaggi Jul 13, 2003 2:19 PM (in response to nbirch)You are correct, not handled in jaws.
See class org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand
Ciao. -
10. Re: Can't get "no-select-before-insert" to work
mkotsbak Oct 27, 2003 11:41 AM (in response to nbirch)This option seems to be added in jboss 3.2.x (as I can see in the DTD)