0
votes

I am trying to add access disable message on worlight console post which my DB will be stopped for some activities, will i still be able to show my end users the access disabled message from worklight console. Or will my App stop working completly, Is there anyway i could test this.

Logs after stopping the mysql DB.

[ERROR   ] FWLSE0081E: Failed synchronizing application from database. [project testApp]
Could not open JPA EntityManager for transaction; nested exception is <openjpa-1.2.2-r422266:898935 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Communications link failure

The last packet successfully received from the server was 19 milliseconds ago.  The last packet sent successfully to the server was 18 milliseconds ago.
[ERROR   ] FWLSE0074E: Failed synchronizing adapters from database. [project testApp]
Could not open JPA EntityManager for transaction; nested exception is <openjpa-1.2.2-r422266:898935 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Communications link failure

The last packet successfully received from the server was 0 milliseconds ago.  The last packet sent successfully to the server was 0 milliseconds ago.
[ERROR   ] FWLSE0188E: Failed to connect to MYSQL database : Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. [project testApp]
[ERROR   ] Connection to the database failed
Connection to the database failed
[ERROR   ] FWLSE0188E: Failed to connect to MYSQL database : Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. [project testApp]
[ERROR   ] FWLSE0081E: Failed synchronizing application from database. [project testApp]
Could not open JPA EntityManager for transaction; nested exception is <openjpa-1.2.2-r422266:898935 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[ERROR   ] FWLSE0188E: Failed to connect to MYSQL database : Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. [project testApp]
[ERROR   ] FWLSE0074E: Failed synchronizing adapters from database. [project testApp]
Could not open JPA EntityManager for transaction; nested exception is <openjpa-1.2.2-r422266:898935 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

screen shot enter image description here djrecker

2

2 Answers

0
votes

If the server's database is down you will not be able to even access your console, therefore you will also not be able to set your remote disable rule. The application will attempt to connect to the server and fail.

If you have some HTTP server in front of the Worklight Server, such as a load balancer or alike, it could be configured to return some status code. You should be able to detect this status code and display an appropriate message back to the end-user.

I further describe this here: Simulate Access disable feature in Worklight , when worklight server itself is down.

0
votes
  1. Try adding access disable on worklight console with the message required
  2. Stop the DB server / instance
  3. Try opening your app and killing it , the generic access disable message would show up.
  4. Also if of DB is down the worklight console will be still accessible from browser but your application would not be visible.
  5. Once the DB is restarted and console is refreshed your application would load on Worklight console
  6. The access disabled message added in step 1 would be retained as it is and would show up on the App
  7. if you have not added the access disabled message on step1 and if the DB is stopped , you will see a generi message as below screen shot, this will be seen everytime you load the app

enter image description here