You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OCI and Azure access token providers currently use the standard CachedResourceFactory to cache tokens. If a thread requests a token from this cache, and the token has expired, then the factory will block the thread while it requests a new token.
The Oracle JDBC Driver implements a cache for JWTs: https://docs.oracle.com/en/database/oracle/oracle-database/23/jajdb/oracle/jdbc/AccessToken.html#createJsonWebTokenCache(java.util.function.Supplier)
This cache is designed for "smooth" updates when a token expires. Like the CachedResourceFactory, this cache can also block threads; It will do so if the cached token is expiring within 30 seconds. However, this cache uses a background thread to begin requesting a new token at one minute before the current token expires. If the request completes within 30 seconds (which is almost always the case), then threads will not become blocked.
Use of Oracle JDBC's cache by OCI and Azure access token providers can benefit users. This cache can reduce latency when creating JDBC connections: A thread which opens a connection would not have to wait for CachedResourceFactory to complete a request for a new token.
This issue is opened for discussion of this enhancement and to track development work.
The text was updated successfully, but these errors were encountered:
The OCI and Azure access token providers currently use the standard CachedResourceFactory to cache tokens. If a thread requests a token from this cache, and the token has expired, then the factory will block the thread while it requests a new token.
The Oracle JDBC Driver implements a cache for JWTs:
https://docs.oracle.com/en/database/oracle/oracle-database/23/jajdb/oracle/jdbc/AccessToken.html#createJsonWebTokenCache(java.util.function.Supplier)
This cache is designed for "smooth" updates when a token expires. Like the CachedResourceFactory, this cache can also block threads; It will do so if the cached token is expiring within 30 seconds. However, this cache uses a background thread to begin requesting a new token at one minute before the current token expires. If the request completes within 30 seconds (which is almost always the case), then threads will not become blocked.
Use of Oracle JDBC's cache by OCI and Azure access token providers can benefit users. This cache can reduce latency when creating JDBC connections: A thread which opens a connection would not have to wait for CachedResourceFactory to complete a request for a new token.
This issue is opened for discussion of this enhancement and to track development work.
The text was updated successfully, but these errors were encountered: