[jboss-user] [JBoss Seam] - will ejb3 rePack my exception?
chibi
do-not-reply at jboss.com
Sat Sep 29 05:36:45 EDT 2007
it seems EJB will rePack my custom exception with EJBTransactionRolledbackException, then add a message "Transaction failed " in facesMessages()
i have a EJB service like this:
| public void doSomething() throws ServiceException{
| try {
| something_to_do();
| } catch (Exception e) {
| throw new ServiceException("sorry, i can't do this");
| }
| }
|
and i have a seam component use this service:
| public doSomethingWithEJB(){
| try {
| ejb.doSomething();
| } catch (ServiceException e) {
| log.info("he can't do that #0", e.getMessage());
| } catch (Exception e) {
| log.info("huh? he throws a new #0 Exception:#1 ", e.getClass(), e.getMessage());
| }
| }
|
when service failed, i got this result:
| huh? he throws a new class javax.ejb.EJBTransactionRolledbackException Exception: sorry, i can't do this
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089941#4089941
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089941
More information about the jboss-user
mailing list