1 Reply Latest reply on Feb 9, 2005 12:41 PM by albertok

    ejbRemove does not remove data

    albertok

      Hi,
      I am using jboss 3.0.8 together with Oracle 8.1.7.
      Scenario:
      Application creates one user managed transaction. In this transaction there are invocations on EntityBean which: remove and create new entities. Each ejbRemove and ejbCreate have RequiresNew attribute. So I thought that entity will be deleted (data deleted on oracle) when ejbRemove completes, but it is not true. I am using commit-option A.

      Thanks in advance for any answer,
      Albert


        • 1. Re: ejbRemove does not remove data
          albertok

          Eventually I have found the issue.
          Remove method might be invoked by home interface or the specified Entity instance. If we invoked remove through home interface then it would be internally invoked by instance. So to summon up, if we used container-configuration to the remove method only on home interace (I did not specify that configuration to the object interface), then default transaction type was taken instead of specified in the descriptor.

          I am not happy that this works like this, because it is difficult to figure out what's going on. What's more if we used xdoclet (1.2.1) and did not specified that ejbRemove is interface-method then xdoclet created transaction configuration to home interfaces only.

          Albert