walterf25 Expert Licensed User Longtime User Dec 1, 2019 #1 Hi All, i'm working on a small app for my sister's pet grooming business, and i'm using the jDBCSql library, i am able to connect to my remote SQL database, but from time to time the connection gets broken and i get the following error. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Click to expand... I know this has to do because i am not using a ConnectionPool, the problem is that i can't find any reference anywhere in the B4A forum that points me to how to do this, i can find references for B4J but i'm not sure if the same library will work with B4A, or am i using the wrong library to do this? When I start the app i am able to retrieve records and even insert new records in the Remote Database but if I let the app go to sleep for a minute or so and then if I try to insert a new record or even search a record i get the error above. Any ideas? Thanks, Walter
Hi All, i'm working on a small app for my sister's pet grooming business, and i'm using the jDBCSql library, i am able to connect to my remote SQL database, but from time to time the connection gets broken and i get the following error. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Click to expand... I know this has to do because i am not using a ConnectionPool, the problem is that i can't find any reference anywhere in the B4A forum that points me to how to do this, i can find references for B4J but i'm not sure if the same library will work with B4A, or am i using the wrong library to do this? When I start the app i am able to retrieve records and even insert new records in the Remote Database but if I let the app go to sleep for a minute or so and then if I try to insert a new record or even search a record i get the error above. Any ideas? Thanks, Walter
Erel B4X founder Staff member Licensed User Longtime User Dec 1, 2019 #2 The correct solution is to use jRDC2. This will solve all these problems. You can try jConnectionPool: https://www.b4x.com/android/forum/t...onpool-extracted-from-jserver.107776/#content I'm not sure whether it is compatible with Android. Upvote 0
The correct solution is to use jRDC2. This will solve all these problems. You can try jConnectionPool: https://www.b4x.com/android/forum/t...onpool-extracted-from-jserver.107776/#content I'm not sure whether it is compatible with Android.
walterf25 Expert Licensed User Longtime User Dec 1, 2019 #3 Erel said: The correct solution is to use jRDC2. This will solve all these problems. You can try jConnectionPool: https://www.b4x.com/android/forum/t...onpool-extracted-from-jserver.107776/#content I'm not sure whether it is compatible with Android. Click to expand... Unfortunately jRDC2 is not an option for me as i'm not using a VPS, B4J can not be run from the host where the database is being hosted. I gave the jConnectionPool a try but i get the following error: error: cannot access PropertyVetoException parent._pool.Initialize(parent._driver,parent._jdbcurl,parent._username,parent._password); ^ class file for java.beans.PropertyVetoException not found Click to expand... Which jar file am I missing? Walter Upvote 0
Erel said: The correct solution is to use jRDC2. This will solve all these problems. You can try jConnectionPool: https://www.b4x.com/android/forum/t...onpool-extracted-from-jserver.107776/#content I'm not sure whether it is compatible with Android. Click to expand... Unfortunately jRDC2 is not an option for me as i'm not using a VPS, B4J can not be run from the host where the database is being hosted. I gave the jConnectionPool a try but i get the following error: error: cannot access PropertyVetoException parent._pool.Initialize(parent._driver,parent._jdbcurl,parent._username,parent._password); ^ class file for java.beans.PropertyVetoException not found Click to expand... Which jar file am I missing? Walter
Erel B4X founder Staff member Licensed User Longtime User Dec 2, 2019 #4 Try this: https://github.com/mini2Dx/android-beans Will probably be easier to switch to a VPS. Upvote 0