Well I worked this out.
It seemed jboss throws an EntityExistsException and the inner exception is
ConstraintViolationException.
Was this changed in 4.0.4.GA todo this??
Thanks
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3949594#3949594
Reply to the post
Hello,
Has something changed with the way you catch exceptions from session beans in
4.0.4.GA??
I was successfully catching ConstraintViolationExceptions by the methods
already discussed on this forum. Namely
1. flushing the entity manager
2. catching ConstraintViolationException
3. throwing
Hello,
I'm looking for some feedback/pointers to start unit testing my application
which makes use of EJB3 and using PostgreSQL
I'm going to use the TestNG framework and I have that all setup and running and
am now starting to setup the EJB3 standalone container.
Is it usual to create say a
Thanks,
I worked out I needed
hibernate .hbm2ddl.auto = update
So my Database tables are created if they arent there (or missing FK s etc..)
but arent removed.
I thought this would have been the default. What type of circumstances would
you use create-drop. Doesnt that defeat the purpose of
Hi, I've been pulling my hair out for hours now migrating from 4.0.3SP1 to
4.0.4RC1. I'm using Postgres 8.1 as by database.
My one remaining issue seems to be that my entity beans are either not being
deployed or are using hibernate instead. No exceptions seem to be thrown at
startup, JBoss is
Interestingly, I removed the database from postgres and I get an exception on
deployment that
org.jboss.resource.JBossResourceException: Could not create connection; -
nested throwable: (org.postgresql.util.PSQLException: FATAL: database posejb3
does not exist)
So I know the persistence is
Hi,
I'm using Postgres 8.1 Jboss 4.0.3SP1. I've just noticed that when I shut
down JBoss, my foreign key constraints are gone, and then when I start it back
up they are created again.
Is this normal behavious?
Thanks
View the original post :
(EJB3)
Is it bad design to use primitives such as int, long, boolean etc.. in Entity
beans?
The reason I ask is that I created an entity on the client but didnt set the
primary key (which was a long). I forgot to put code in to set the primary key
before calling persist. As a result it was
I am starting up a subscriber connection to a topic. As soon as I call
createTopicConnection I get a fairly large bunch of messages printed to the
console as well as a stack trace but it almost appears as if this is just debug
output.
Is this normal? And if so can I shut it off? Or is it an