1. Milton Jiménez
  2. PowerServer
  3. Friday, 30 April 2021 21:44 PM UTC

Hi Friends, I am trying PS2021,

the lifetime of a session, how could I control it?
because the service falls(api) if it is not used in a short time

The system connects with the same transact SQLCA to several databases, dynamically, as it would be done with PS2021?

 

Thanks,

Best Regards



Milton Jiménez Accepted Answer Pending Moderation
  1. Saturday, 1 May 2021 21:22 PM UTC
  2. PowerServer
  3. # 1

Y la otra pregunta era sobre la database configuration

database configuration

La misma transaction SQLCA  puede apuntar a dos caches diferentes o esto ya lo manejo en PowerServer's APIs desde Snap Develop ? para en tiempo de ejecucion cambiar de conexion a otra base de datos?

 

Best Regards,

Comment
  1. Govinda Lopez @Appeon
  2. Sunday, 2 May 2021 00:18 AM UTC
Hola Milton,



Esto si está soportado. Se realiza una configuración del lado del proyecto de PowerServer Web API.



Siendo que PowerServer 2021 se encuentra en versión Beta, la documentación aún no está completa. Sin embargo el equipo de ingeniería está activamente trabajando en una aplicación demo que ilustra esta configuración. En cuanto esté disponible te la podré compartir.



Saludos,
  1. Helpful
  1. Milton Jiménez
  2. Sunday, 2 May 2021 02:48 AM UTC
Gracias Govinda quedo Atento,





  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Saturday, 1 May 2021 16:04 PM UTC
  2. PowerServer
  3. # 2

Hi Milton,

Are you talking about an application session or DB transaction?  These are two different concepts.

There are 3 ways that an application session is released:

  1. The user closes the PowerServer application.  Upon close, PowerServer will automatically release the session.
  2. In the case of abnormal close or user leaves the application open, the session is released when the timeout period is reached.  You configure this session timeout in the Applications.json file.
  3. You can programmatically access PowerServer's APIs and kill the session. You use the various SessionClient methods of the powerServerService class in the REST API.

There are 3 ways that an DB transaction is released:

  1. Your application code executes a commit or rollback.
  2. In the case of abnormal code execution, the transaction is released when the timeout period is reached.  You configure this transaction timeout in the Applications.json file.  Also, your database itself should have a timeout configuration as well.
  3. You can programmatically access PowerServer's APIs and kill the transaction.  You use the various RollbackAndCreateTransactionAsync methods of the powerServerService class in the REST API.

Best regards,
Armeen

 

Comment
  1. Milton Jiménez
  2. Saturday, 1 May 2021 20:59 PM UTC
Thanks, I'm going to check the Applications.json file,

Best Regards
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Saturday, 1 May 2021 15:59 PM UTC
  2. PowerServer
  3. # 3

As I can see this is documented in the following link:
https://docs.appeon.com/pb2021/whats_new/How-to.html
It says:

The ServerAPIs project contains a number of configurable files under the AppConfig folder:

  • Applications.json: This file contains the basic information of the deployed applications, including the application name, session timeout value, transaction timeout value, mappings of transactions and connection caches.

  • Connection-Cache.json: This file contains the database connection strings, including the connection cache name, database type, data source settings, and some advanced settings.

  • Email.json: (will be available later) This file must be configured first if you want to get notifications for license expiration. The settings include the SMTP server settings, sender email settings, and recipients.

  • License.json: This file contains the license information, including product ID, product key, secret key, etc. If you have imported and deployed the license file with the PowerServer project, then the license information will be stored to this file. If you have not imported and deployed the license file, then you should manually configure this file with the license file.

  • log4net.config: This file contains the logging settings for PowerServer. The "Console" section specifies to print the logging information in the console, the "RollingFile" section specifies the location, size, and backup of the log file, the "TraceAppender" section specifies to generate the trace log, the "ConsoleAppender" section specifies to print the logging information in the console and sets the font color of the logging information. For detailed syntax, refer to Apache Log4Net Manual.

  • Statistics.json: (will be available later) This file determines which type of transaction statistics will be generated and cached in the memory. Some settings are disabled by default to lower memory usages. You can also take advantage of the StatisticsController APIs in PowerServer NuGet package to get the statistics.

Andreas.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Saturday, 1 May 2021 15:46 PM UTC
  2. PowerServer
  3. # 4

Hi.

Haven't tested yet, but in generated c# project's AppConfig folder there is a Applications.json file. It has the following contents:

{
  "Applications": [
    {
      "ApplicationName": "MyApp",
      "SelectInTransaction": false,
      "CloudTransactions": [
        {
          "TransactionName": "sqlca",
          "CacheName": "MyCache"
        }
      ],
      "Session": {
        "Timeout": 3600
      },
      "Transaction": {
        "Timeout": 3600
      }
    }
  ]
}

I guess that you should modify Session -> Timeout option.

Andreas.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.