Entity Bean Wrapped in Session Bean -- Rollback Problems

Discussions

EJB programming & troubleshooting: Entity Bean Wrapped in Session Bean -- Rollback Problems

  1. Hi,

    I'm experiencing a problem with transaction rollback in an entity bean wrapped by a session bean.

    On the ejbCreate, if it throws a CreateException, I have it caught by the session bean, which subsequently throws an EJBException. Now, I know that a CreateException does not automatically mark a transaction for rollback, but if the entity is wrapped in a session bean, shouldn't the EJBException thrown in the session bean rollback everything?

    BTW, I have the transaction attribute for the entity defined as "Supported"

    Thanks to anyone that can help.

    Threaded Messages (3)

  2. Also...[ Go to top ]

    The Entity persistence is bean-managed.
  3. Nevermind.. Figured it out.[ Go to top ]

    Apparently, the original creator of the session bean never defined the transaction attribute in the assembly-descriptor. Setting it to "Required" fixed everything.

    On a related note, it's strange to me that the session bean worked at all without the transaction attribute defined. I guess there's a default?
  4. Nevermind.. Figured it out.[ Go to top ]

    Actualy there is not an official default. It is left up to the container to decided what to do if not tx context is specified.