[JBoss-user] [Beginners Corner] - EJB 2.1 compliance

2004-11-01 Thread pgb
Hi, What is the oldest version that supports EJB 2.1? I'm trying to use ORDER BY clauses on JBoss 3.2.3 and am failing... Is my version of JBoss too old? Thanks in advance. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3853483#3853483 Reply to the post :

[JBoss-user] [Persistence CMP/JBoss] - Unique constraints and TransactionRolledbackLocalException

2004-09-13 Thread pgb
Hello, I have a CMP bean and a session bean. My session bean has this method: | public void updateVariable(VariableValue variableValue) { | VariableLocal variable; | | try { | variable =

[JBoss-user] [Persistence CMP/JBoss] - Unable to catch DuplicateKeyException

2004-09-12 Thread pgb
Hello, I have a CMP entity bean, and a session bean with a createObject(ValueObject object) method as a facade to create new instances. I want to catch a DuplicateKeyException on my createObject method, however I'm unable to do it... JBoss catches the exception and shows it on the console...

[JBoss-user] [Persistence CMP/JBoss] - Re: Catching TransactionRolledbackException

2004-07-07 Thread pgb
This is the calling code: | protected final ActionForward executeSave(ActionMapping mapping, BaseCRUDForm form, HttpServletRequest request, HttpServletResponse response) throws CRUDBusinessAccessException { | if (form.isNew()) { | return

[JBoss-user] [Persistence CMP/JBoss] - Re: Catching TransactionRolledbackException

2004-07-05 Thread pgb
It is still not working with the RequiresNew... Here's the relevant code (for another bean called Area instead of country): updateArea method on a session bean: /** | * | * @param value | * | * @ejb.interface-method | * view-type = both

[JBoss-user] [Beginners Corner] - Catching TransactionRolledbackException

2004-07-02 Thread pgb
Hello, I have a session bean with a method void updateCountry(CountryValue value) This method will instantiate a Country bean (with the primary key) and then call the setCountryValue method on the Country bean. Country is mapped as CMP, and the table has some unique constraints. If the data

[JBoss-user] [Persistence CMP/JBoss] - Catching TransactionRolledbackException

2004-07-02 Thread pgb
Hello, I have a session bean with a method void updateCountry(CountryValue value) This method will instantiate a Country bean (with the primary key) and then call the setCountryValue method on the Country bean. Country is mapped as CMP, and the table has some unique constraints. If the data

[JBoss-user] [Persistence CMP/JBoss] - Re: Catching TransactionRolledbackException

2004-07-02 Thread pgb
I could check that, however it will mean duplicating the unique constraints both on the DB and on the business layer (Java), and I wanted to take advantage of the DB checking of the contraints, and catching the exception. Is that possible? Thank you! View the original post :

[JBoss-user] [Persistence CMP/JBoss] - Re: Unique constraints and surrogate keys

2004-06-11 Thread pgb
No, not a single exception at deployment nor runtime. It is a snippet from my jbosscmp-jdbc.xml (it's working properly, as the specified datasource is correctly used (and it's not in standardjbosscmp-jdbc.xml). Thanks again View the original post :

[JBoss-user] [Persistence CMP/JBoss] - Re: Unique constraints and surrogate keys

2004-06-10 Thread pgb
loubyansky wrote : What is the problem using entity-command in defaults? Have a look at standardjbosscmp-jdbc.xml. It follows the same dtd. | I really don't know what the problem is. I tried: defaults | datasourcejava:/OracleDS/datasource |

[JBoss-user] [Persistence CMP/JBoss] - Re: Unique constraints and surrogate keys

2004-06-09 Thread pgb
Thanks Alexey, that works great! Howerver, I'm not able to add the entity command on the defaults section. Also, is there any side-effect for turning this option on? Where can I read more about it? This is my jbosscmp-jdbc-defaults.xml file (XDoclet is correctly merging it): defaults |

[JBoss-user] [Persistence CMP/JBoss] - Re: Unique constraints and surrogate keys

2004-06-09 Thread pgb
I tested it a little bit more, and got a new question: It now fails when inserting a new record. Is there any way I can get a DuplicateKeyException on an update? The reason we use surrogate keys is partially because we can allow users to later modify the code, that would otherwise have been the

[JBoss-user] [Persistence CMP/JBoss] - Unique constraints and surrogate keys

2004-06-08 Thread pgb
Hello, I'm using JBoss 3.2.3 with Oracle 8. Our DB team usually designs the table with a surrogate key (sequence based) and then adds a UNIQUE constraint to the natural key of the table. For instance, this table: | COUNTRY |COUNTRY_ID |CODE |NAME | will have a sequence

[JBoss-user] [Persistence CMP/JBoss] - Re: Unique constraints and surrogate keys

2004-06-08 Thread pgb
I wanted to use the database for the unique constraints in order to save the DB access of a finder method that checks the existance of a similar record. Do you know of any other alternative that does not require another hit to the DB? Thanks for you quick answer. View the original post :

[JBoss-user] [Beginners Corner] - XDoclet, value-object and not-null FK

2004-06-01 Thread pgb
Hello, I'm using XDoclet to generate my value objects, and I'm having trouble with the compose tags. The scenario is as follows: I have a Country entity bean, and a State entity bean. A Country can have many states. In the DB, I have a foreign key on the states table, and the foreign key is