Müritler Selamlar, Javada CallableStatement ile bir DB prosodürü çağırıyorum. CallableStatement prosodürü tetiklediğinde prosodürün tamamlanması 1 saatten az ise tamamlandığında kod devam ediyor ve bir problem olmuyor. Fakat 1 saati geçtiğinde oracle sunucu bağlantı üzerinde hiç bir işlem yapılmadığı için bu bağlantıyı sonlandırıyor ve prosodürün tamamlandı bilgisi bana gelmiyor. CallableStatement'da heartbeat tanımlayabiliyor muyuz? Veya bu durumu nasıl aşabilirim fikri olan var mı? Not: Ne yazık ki o 1 saati arttıramıyorum. Bilgi güçtür...

hocam oracle bilmiyorum ama dbdir sonuçta :) genel geçer yntem; prosedür dbde bir tabloya durumunu yazsın , sen de aralıklarla oradan prosüdürün durumunu kontrol et. ...

ChatGPT nerileri: In Oracle, the server is responsible for managing and executing the procedures invoked through a "CallableStatement." By default, the server handles the procedure execution and returns the result to the client. To keep the Oracle server alive while using a "CallableStatement" procedure, you need to ensure that the connection to the database remains open. If the connection is closed, the server may release associated resources, and the session will be terminated. Here are some methods to keep the connection alive: Reuse the Connection: Instead of opening and closing the connection for each procedure call, you can reuse the same connection across multiple calls. This way, the connection remains active throughout the session. Connection Pooling: Implement connection pooling, which involves creating a pool of database connections and managing them efficiently. Connection pooling helps to reuse existing connections and reduces the overhead of creating new connections for each request. Set Connection Timeout: Configure the connection timeout appropriately. Ensure that the connection timeout is set to a higher value, so the connection remains open for a longer duration. Keep-Alive Queries: Periodically execute "keep-alive" queries to the database, even when there's no immediate work to be done. These queries can be simple, like fetching a constant value, just to keep the connection active. Handle Exceptions Gracefully: In case an exception occurs during the procedure execution, make sure to handle it properly to avoid unexpected disconnections. It's important to note that even with the above methods, there are still factors beyond your control, like network issues or server-side configurations that might lead to a connection being closed. Therefore, designing your application with error handling and connection re-establishment capabilities is essential for robustness. Remember that keeping connections open for an unnecessarily long time can lead to resource exhaustion on the server side, so finding an appropriate balance is crucial. The tip of the tongue taking a trip of three steps down the palate to tap, at three, on the teeth. Lo. Lee. Ta.