- VERSION 5.08.02

- Se hizo un cambio para tratar de que las conexiones se "identifiquen" con Oracle y Jorge pueda saber que conexiones/recursos estamos ocupando
This commit is contained in:
2025-08-02 22:46:38 -06:00
parent 45e4336d3c
commit 6597ef3394
4 changed files with 11 additions and 6 deletions

View File

@@ -72,7 +72,7 @@ Public Sub Initialize(DB As String)
' Dim jo2 As JavaObject = pool
' Log(jo2.GetField("END_TO_END_CLIENTID_INDEX"))
jo.RunMethod("setPreferredTestQuery", Array("BEGIN DBMS_SESSION.SET_IDENTIFIER('whatever'); END;"))
' jo.RunMethod("setPreferredTestQuery", Array("BEGIN DBMS_SESSION.SET_IDENTIFIER('jRDC_Multi'); END;"))
' jo.RunMethod("setPreferredTestQuery", Array("alter session set current_schema=MYSCHEMA"))
' jo2.RunMethod("setClientIdentifier",Array( "MAX")) ' Tiempo máximo de inactividad antes de cerrar una conexión
#if DEBUG
@@ -88,8 +88,8 @@ End Sub
Private Sub LoadConfigMap(DB As String) As Map
Private DBX As String = ""
If DB <> "" Then DBX = "." & DB
Log("===========================================")
Log($"Leemos el config${DBX}.properties"$)
Log("============= LoadConfigMap =============")
Log($""========= Leemos el config${DBX}.properties ========="$)
Return File.ReadMap("./", "config" & DBX & ".properties")
End Sub
@@ -106,8 +106,10 @@ Public Sub GetCommand(DB As String, Key As String) As String
End Sub
Public Sub GetConnection(DB As String) As SQL
Log("============= GetConnection ============= ")
If DB.EqualsIgnoreCase("DB1") Then DB = "" 'Esto para el config.properties or default
If DebugQueries Then LoadSQLCommands(LoadConfigMap(DB), DB)
Log("regresamos 0")
Return pool.GetConnection
End Sub
@@ -121,6 +123,7 @@ Private Sub LoadSQLCommands(config2 As Map, DB As String)
End If
Next
commands = newCommands
Log(commands)
' Log($"Inicializado: ${DB} "$ & Main.commandsMap.IsInitialized)
Main.commandsMap.Put(DB, commands)
End Sub