Is there particular consideration to open a new transaction to invoke <permission-service>?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there particular consideration to open a new transaction to invoke <permission-service>?

Leon
In most cases, that's OK. But we meet problem when our <permission-service> need to access new record created in main transaction. It cause "dead locking" in Derby database.

I find the following code piece:
resp = dispatcher.runSync(permission.name,  ctx, 300, true); // org.ofbiz.service.ModelService: line 983

and, I'm not understand the reason behind the "true" here. Any harmful or side-effect to change it to "false"?


Reply | Threaded
Open this post in threaded view
|

Re: Is there particular consideration to open a new transaction to invoke <permission-service>?

Jacques Le Roux
Administrator
I see no other reason than to introduce a timeout

Jacques

Leon wrote:

> In most cases, that's OK. But we meet problem when our <permission-service>
> need to access new record created in main transaction. It cause "dead
> locking" in Derby database.
>
> I find the following code piece:
> resp = dispatcher.runSync(permission.name,  ctx, 300, true); //
> org.ofbiz.service.ModelService: line 983
>
> and, I'm not understand the reason behind the "true" here. Any harmful or
> side-effect to change it to "false"?