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 :
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 =
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...
This is the calling code:
| protected final ActionForward executeSave(ActionMapping mapping, BaseCRUDForm
form, HttpServletRequest request, HttpServletResponse response) throws
CRUDBusinessAccessException {
| if (form.isNew()) {
| return
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
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
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
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 :
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 :
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
|
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
|
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
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
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 :
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
15 matches
Mail list logo