You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Moritz Gmelin <mo...@gmx.de> on 2008/04/22 17:26:19 UTC

Threading issues with DB operations on OS X

Hi,

There seems to be some threading issues when doing database updates  
from page to page.
E.G. we have a page that displays a list of elements in a Database  
table and a button that you can click to add a new entry.
The button is a ActionLink. Its method handler adds an element to the  
database table and returns the user to the same page.
Normally, for each click of the button, I can see one row added to the  
database and visible in the grid on the page. But sometimes if I click  
the button, the content of the grid does not change although I can see  
that an element was added to the database.
 From other similar problems we have with the application, I would  
guess, that the display of the new page happens with a new database  
session, where the old session's transaction (to add the element) is  
not yet finished.
The environment we use is OS X with Java 1.5.0 and a PostgreSQL  
Database.
Has anybody else seen this behaviour?
Is there somewhere  I can for a transaction to be completely finished  
before the new page is activated ?

Thanks

Moritz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Threading issues with DB operations on OS X

Posted by Moritz Gmelin <mo...@gmx.de>.
Looks like my issue.
I'll give it a try.

Thanks

Am 22.04.2008 um 17:46 schrieb Howard Lewis Ship:

> Yes, it does sound like
>
> https://issues.apache.org/jira/browse/TAPESTRY-2247
>
> which is fixed in the nightly snapshots.
>
> On Tue, Apr 22, 2008 at 8:26 AM, Moritz Gmelin  
> <mo...@gmx.de> wrote:
>> Hi,
>>
>> There seems to be some threading issues when doing database updates  
>> from
>> page to page.
>> E.G. we have a page that displays a list of elements in a Database  
>> table
>> and a button that you can click to add a new entry.
>> The button is a ActionLink. Its method handler adds an element to the
>> database table and returns the user to the same page.
>> Normally, for each click of the button, I can see one row added to  
>> the
>> database and visible in the grid on the page. But sometimes if I  
>> click the
>> button, the content of the grid does not change although I can see  
>> that an
>> element was added to the database.
>> From other similar problems we have with the application, I would  
>> guess,
>> that the display of the new page happens with a new database  
>> session, where
>> the old session's transaction (to add the element) is not yet  
>> finished.
>> The environment we use is OS X with Java 1.5.0 and a PostgreSQL  
>> Database.
>> Has anybody else seen this behaviour?
>> Is there somewhere  I can for a transaction to be completely finished
>> before the new page is activated ?
>>
>> Thanks
>>
>> Moritz
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> -- 
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Threading issues with DB operations on OS X

Posted by Howard Lewis Ship <hl...@gmail.com>.
Yes, it does sound like

https://issues.apache.org/jira/browse/TAPESTRY-2247

which is fixed in the nightly snapshots.

On Tue, Apr 22, 2008 at 8:26 AM, Moritz Gmelin <mo...@gmx.de> wrote:
> Hi,
>
>  There seems to be some threading issues when doing database updates from
> page to page.
>  E.G. we have a page that displays a list of elements in a Database table
> and a button that you can click to add a new entry.
>  The button is a ActionLink. Its method handler adds an element to the
> database table and returns the user to the same page.
>  Normally, for each click of the button, I can see one row added to the
> database and visible in the grid on the page. But sometimes if I click the
> button, the content of the grid does not change although I can see that an
> element was added to the database.
>  From other similar problems we have with the application, I would guess,
> that the display of the new page happens with a new database session, where
> the old session's transaction (to add the element) is not yet finished.
>  The environment we use is OS X with Java 1.5.0 and a PostgreSQL Database.
>  Has anybody else seen this behaviour?
>  Is there somewhere  I can for a transaction to be completely finished
> before the new page is activated ?
>
>  Thanks
>
>  Moritz
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Threading issues with DB operations on OS X

Posted by Davor Hrg <hr...@gmail.com>.
what version of tapestry is it ?

there has been a recent fix that changes the way trasactions are handled.
before that database connections were on autocommit and sometimes that
caused
the problems you describe.
if you commit explicitely the problem will most likely be gone ...

Davor Hrg


On Tue, Apr 22, 2008 at 5:26 PM, Moritz Gmelin <mo...@gmx.de> wrote:

> Hi,
>
> There seems to be some threading issues when doing database updates from
> page to page.
> E.G. we have a page that displays a list of elements in a Database table
> and a button that you can click to add a new entry.
> The button is a ActionLink. Its method handler adds an element to the
> database table and returns the user to the same page.
> Normally, for each click of the button, I can see one row added to the
> database and visible in the grid on the page. But sometimes if I click the
> button, the content of the grid does not change although I can see that an
> element was added to the database.
> From other similar problems we have with the application, I would guess,
> that the display of the new page happens with a new database session, where
> the old session's transaction (to add the element) is not yet finished.
> The environment we use is OS X with Java 1.5.0 and a PostgreSQL Database.
> Has anybody else seen this behaviour?
> Is there somewhere  I can for a transaction to be completely finished
> before the new page is activated ?
>
> Thanks
>
> Moritz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Threading issues with DB operations on OS X

Posted by Robert Zeigler <ro...@scazdl.org>.
I assume that you are using Hibernate; there was a Jira issue filed  
(and fixed) on this recently.
Sorry, I don't recall offhand which jira issue; I don't personally use  
hibernate, so I don't pay the hibernate-related jiras much attention.

Robert

On Apr 22, 2008, at 4/2210:26 AM , Moritz Gmelin wrote:
> Hi,
>
> There seems to be some threading issues when doing database updates  
> from page to page.
> E.G. we have a page that displays a list of elements in a Database  
> table and a button that you can click to add a new entry.
> The button is a ActionLink. Its method handler adds an element to  
> the database table and returns the user to the same page.
> Normally, for each click of the button, I can see one row added to  
> the database and visible in the grid on the page. But sometimes if I  
> click the button, the content of the grid does not change although I  
> can see that an element was added to the database.
> From other similar problems we have with the application, I would  
> guess, that the display of the new page happens with a new database  
> session, where the old session's transaction (to add the element) is  
> not yet finished.
> The environment we use is OS X with Java 1.5.0 and a PostgreSQL  
> Database.
> Has anybody else seen this behaviour?
> Is there somewhere  I can for a transaction to be completely  
> finished before the new page is activated ?
>
> Thanks
>
> Moritz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org