Openbravo Issue Tracking System - Retail Modules
View Issue Details
0022811Retail ModulesWeb POSpublic2013-01-16 17:462013-01-17 09:33
marvintm 
marvintm 
urgentmajorsometimes
closedfixed 
5
 
 
guilleaer
No
0022811: The WebPOS creates too many connections, and doesn't reuse them
Currently the WebPOS is generating connections when the user logs in, and this connections are never reused. The result is that the number of active connections grows indefinitely.

- Log in the WebPOS.
- Verify the number of active connections (for example with select * from pg_stat_activity).
- Logout and log in again.
- Verify that the number of active connections went up.
Integer
This sometimes doesn't happen, probably because the garbage collector is able to detect that the class which handles the unneeded connections is no longer referenced and destroys it, alongside its connections.
The root cause of the problem is that a new connection pool is being created every time a call to the POSUtils.getLastDocumentNumberForPOS method is called. This is wrong, and the query should be done using one of the standard connection pools.
No tags attached.
Issue History
2013-01-16 17:46marvintmNew Issue
2013-01-16 17:46marvintmAssigned To => marvintm
2013-01-16 17:47marvintmStatusnew => acknowledged
2013-01-16 17:47marvintmStatusacknowledged => scheduled
2013-01-16 17:47marvintmfix_in_branch => pi
2013-01-16 17:47marvintmfix_in_branchpi =>
2013-01-16 17:49marvintmReview Assigned To => guilleaer
2013-01-16 17:52hgbotCheckin
2013-01-16 17:52hgbotNote Added: 0055547
2013-01-16 17:52hgbotStatusscheduled => resolved
2013-01-16 17:52hgbotResolutionopen => fixed
2013-01-16 17:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/abc23166286b575784e8bd32bf642725128b4694 [^]
2013-01-16 18:48guilleaerNote Added: 0055548
2013-01-16 18:48guilleaerStatusresolved => closed
2013-01-16 18:48guilleaerFixed in Version => RMP19
2013-01-17 02:28hgbotCheckin
2013-01-17 02:28hgbotNote Added: 0055550
2013-01-17 02:28hgbotStatusclosed => resolved
2013-01-17 02:28hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/abc23166286b575784e8bd32bf642725128b4694 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c933b4a55810f9bc88d5167eb564af6991e6765a [^]
2013-01-17 09:25caristuReview Assigned Toguilleaer => caristu
2013-01-17 09:25caristuNote Added: 0055552
2013-01-17 09:25caristuStatusresolved => closed
2013-01-17 09:30caristuStatusclosed => new
2013-01-17 09:30caristuResolutionfixed => open
2013-01-17 09:30caristuFixed in VersionRMP19 =>
2013-01-17 09:31caristuNote Deleted: 0055552
2013-01-17 09:32marvintmStatusnew => scheduled
2013-01-17 09:32marvintmfix_in_branch => pi
2013-01-17 09:32marvintmStatusscheduled => resolved
2013-01-17 09:32marvintmResolutionopen => fixed
2013-01-17 09:33marvintmReview Assigned Tocaristu => guilleaer
2013-01-17 09:33marvintmNote Added: 0055553
2013-01-17 09:33marvintmStatusresolved => closed

Notes
(0055547)
hgbot   
2013-01-16 17:52   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: abc23166286b575784e8bd32bf642725128b4694
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jan 16 17:52:09 2013 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/abc23166286b575784e8bd32bf642725128b4694 [^]

Fixed issue 22811. The login process will no longer create a new connection pool.

---
M src/org/openbravo/retail/posterminal/POSUtils.java
---
(0055548)
guilleaer   
2013-01-16 18:48   
Code reviewed and tested
(0055550)
hgbot   
2013-01-17 02:28   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c933b4a55810f9bc88d5167eb564af6991e6765a
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jan 16 17:52:09 2013 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c933b4a55810f9bc88d5167eb564af6991e6765a [^]

Fixed issue 22811. The login process will no longer create a new connection pool.

---
M src/org/openbravo/retail/posterminal/POSUtils.java
---
(0055553)
marvintm   
2013-01-17 09:33   
Closed again, as it was incorrectly reopened.