[OFBiz] Users - Transactions in Ofbiz

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

[OFBiz] Users - Transactions in Ofbiz

Ravish Kamath-3
Hi All,

We were trying to implement a service in ofbiz which would try & fetch RSS
feeds from the net & persist them into entities. However we ran into
intermittent transaction related errors. The errors were always shown on the
line where the delegator.create() call was happening. The question was how
was this transaction set to roll-back & why. Later after a few test cases,
we found that this was an issue whenever the number of feeds to be retrieved
were larger.

So finally after some hacking around we observed that a service by default
has use-transaction attribute as true & it was this transaction that was
timing out, getting marked for roll-back and all child transactions would
defenitely run into problems.

So now my question is:

why services in ofbiz have use-transaction attribute as default true,
would'nt false be better? This would seem to run into a problem if the
service had time-intensive operations to be run.

Also we seem to run into another problem which we have currently no idea on.

java.lang.IllegalArgumentException: Could not get next sequence ID for
sequence name: ServerHitBin
org.ofbiz.entity.GenericDelegator.getNextSeqId(GenericDelegator.java:2085)
org.ofbiz.entity.GenericDelegator.getNextSeqId(GenericDelegator.java:2072)
org.ofbiz.content.stats.ServerHitBin.advanceBin(ServerHitBin.java:560)
org.ofbiz.content.stats.ServerHitBin.addHit(ServerHitBin.java:514)
org.ofbiz.content.stats.ServerHitBin.countHit(ServerHitBin.java:214)
org.ofbiz.content.stats.ServerHitBin.countHit(ServerHitBin.java:93)


This problem seems to happen with ServerHitBin or VisitId sequences, there
is no other go but to restart the server, could anyone please give me some
pointers as to why this is happening ?

We are on Ofbiz version 3.2.0.

cheers
ravish



 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Transactions in Ofbiz

Si Chen-2
You might consider setting 'transaction-timout' (yes, it's misspelled)
for your larger feeds.

Why it defaults to "true": because most services are business processes
that require transactions?  Changing use-transaction now to default to
"false" instead of "true" would not be practical, given how many
services there are?

Si

Ravish Kamath wrote:

>Hi All,
>
>We were trying to implement a service in ofbiz which would try & fetch RSS
>feeds from the net & persist them into entities. However we ran into
>intermittent transaction related errors. The errors were always shown on the
>line where the delegator.create() call was happening. The question was how
>was this transaction set to roll-back & why. Later after a few test cases,
>we found that this was an issue whenever the number of feeds to be retrieved
>were larger.
>
>So finally after some hacking around we observed that a service by default
>has use-transaction attribute as true & it was this transaction that was
>timing out, getting marked for roll-back and all child transactions would
>defenitely run into problems.
>
>So now my question is:
>
>why services in ofbiz have use-transaction attribute as default true,
>would'nt false be better? This would seem to run into a problem if the
>service had time-intensive operations to be run.
>
>Also we seem to run into another problem which we have currently no idea on.
>
>java.lang.IllegalArgumentException: Could not get next sequence ID for
>sequence name: ServerHitBin
>org.ofbiz.entity.GenericDelegator.getNextSeqId(GenericDelegator.java:2085)
>org.ofbiz.entity.GenericDelegator.getNextSeqId(GenericDelegator.java:2072)
>org.ofbiz.content.stats.ServerHitBin.advanceBin(ServerHitBin.java:560)
>org.ofbiz.content.stats.ServerHitBin.addHit(ServerHitBin.java:514)
>org.ofbiz.content.stats.ServerHitBin.countHit(ServerHitBin.java:214)
>org.ofbiz.content.stats.ServerHitBin.countHit(ServerHitBin.java:93)
>
>
>This problem seems to happen with ServerHitBin or VisitId sequences, there
>is no other go but to restart the server, could anyone please give me some
>pointers as to why this is happening ?
>
>We are on Ofbiz version 3.2.0.
>
>cheers
>ravish
>
>
>
>
>_______________________________________________
>Users mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/users
>
>  
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users