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
{
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.
source