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"
| * @ejb.transaction
| * type = "RequiresNew"
| *
| */
| public void updateArea(AreaValue value) {
| try {
| System.out.println("updateArea");
| AreaLocal area =
AreaUtil.getLocalHome().findByPrimaryKey(value.getPrimaryKey());
| area.setAreaValue(value);
| } catch (FinderException e) {
| // TODO Auto-generated catch block
| System.out.println("finder exception");
| e.printStackTrace();
| } catch (NamingException e) {
| // TODO Auto-generated catch block
| System.out.println("naming exception");
| e.printStackTrace();
| } catch (Exception e) {
| System.out.println("exception!");
| e.printStackTrace();
| System.out.println("end exception");
| }
| }
|
setAreaValue on AreaBean:
| /**
| *
| * @param value
| *
| * @ejb.interface-method
| * @ejb.transaction
| * type = "Required"
| */
| public abstract void setAreaValue(AreaValue value);
|
Whenever a unique constraint on the DB fails, I get a TransactionRolledBackException
on the JBoss console and I'm not able to catch it...
Thanks again!
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840969#3840969
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840969
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user