Commit when opening a new transaction in a transaction

Using Ejb3.0, Weblogic 11g, JDBC

I call a method that remotely runs on another EAR deployment.

A method in remote deployment that is called, but annotated with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)

the problem is that all the logic that I do in the database before the remote method is called will not be completed before the remote method is completed.

What I want to do is commit, allowing the logic to "do", and when I get back after the remote call continues normally.

Any idea?

Some code to explain:

@CallByReference
@Stateless(mappedName = "ejb/OperatorProccessBean")
@Local({ OperatorProccessBeanLocal.class })
@Remote({ OperatorProccessBeanRemote.class })
public class OperatorProccessBean implements OperatorProccessBeanLocal,  
 OperatorProccessBeanRemote
{   

...

   SBNDispatchBeanRemote SBNDispatchBean = (SBNDispatchBeanRemote) context.lookup("ejb/SBNDispatchBean#com.mirs.sbn.dispatch.SBNDispatchBeanRemote");
    if (SBNDispatchBean == null)
    {
            logger.error(TAG + " SBNDispatchBean is null");

    }
    else
    {
         //until here I want all my data to be commited without waiting for the upcoming remote method to finish
         SBNDispatchBean.updateSubscriberInBlockingList(...);
    }
...
 }

Now the method is updateSubscriberInBlockingList()annotated with

@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)

I want data to be executed before calling this method.

Thanks in advance, rays.

+3
source
2

updateSubscriberInBlockingList() @TransactionAttribute (TransactionAttributeType.REQUIRES_NEW)

, .

, , , . , , . , .

, EJB JTA Transaction Manager, , , JTA, X/Open DTP. X/Open DTP , , . , , ( ), . , .

, , , .

+2

" " bean, REQUIRES_NEW. , :

  • ( , );
  • ;
  • .
+1

All Articles