[redhat-ccm-list] CCM - Transactions. Please Help!!

Vadim Nasardinov vadimn at redhat.com
Fri May 14 15:44:51 UTC 2004


On Friday 14 May 2004 11:03, srini wrote:
> Here is what I do in my web app:
>
> 1. Whenever a logged in user submits a job, I create an JOB instance
>    in the database (using domain object), do an explicit disconnect
>    of this instance and put into a Job Queue (in memory)
>
> 2. A thread monitors this Job Queue and processes each job in the
>    queue.  Since the stored job instances (in the queue are READ
>    ONLY), I then retrieve the job details again from the database
>    using this READ ONLY object's ID. That is when I run into this
>    exception.

Firstly, it sounds like you don't really want to store the entire
disconnected object in the queue anyway.  All you need is the object's
ID.  You can just queue the BigDecimals.

Now, this may not solve your problem, but it will eliminate some
unnecessary overhead and express your intention more succinctly.

Secondly, we should probably take a look at the code that sets up and
tears down transactions in your background thread.





More information about the Redhat-ccm-list mailing list