Hi,
I tried your suggestion, but I get exactly the same problem. Here's my new
code:
| public boolean addUser(String username) {
| try {
| User newUser = new User(username);
| em.persist(newUser);
| em.flush();
|
| return true;
| } catch (Exception e) {
| /* Ignore exception */
| return false;
| }
| }
Reading the other thread that you pointed us at, it seems that the only way to
get around this is to catch the exception in the calling code. From what I can
gather, the best way to do this is to create a new Exception class and annotate
it with '@ApplicationException(rollback=true)'.
My problem remains though, the exception cannot be handled and quashed within
the Session bean's 'addUser' method...is my understanding correct?
Thanks for your help,
Jason
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918177#3918177
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918177
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user