This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| OracleDataSource ods = new oracle.jdbc.pool.OracleDataSource(); | |
| ods.setURL(DB_URL); | |
| ods.setUser(DB_USER); | |
| ods.setPassword(DB_PASSWORD); | |
| Properties props = new Properties(); | |
| props.setProperty("oracle.jdbc.useTrueCacheDriverConnection", "true"); | |
| ods.setConnectionProperties(props); | |
| // this is a True Cache driver connection and it can be used to execute | |
| // queries on both the primary database and a True Cache instance | |
| Connection conn = ods.getConnection(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <! -- DependencyManagement block --> | |
| <dependencyManagement> | |
| <dependencies> | |
| <dependency> | |
| <groupId>com.oracle.database.jdbc</groupId> | |
| <artifactId>ojdbc-bom</artifactId> | |
| <version>19.7.0.0</version> | |
| <type>pom</type> | |
| <scope>import</scope> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <groupId>com.oracle.database.jdbc</groupId> | |
| <artifactId>ojdbc-bom</artifactId> | |
| <version>19.7.0.0</version> | |
| <packaging>pom</packaging> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <dependencies> | |
| ... | |
| <dependency> | |
| <groupId>com.oracle.database.jdbc</groupId> | |
| <artifactId>ojdbc8-production</artifactId> | |
| <version>19.7.0.0</version> | |
| <type>pom</type> | |
| </dependency> | |
| ... | |
| </dependencies> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn deploy --app adb-ucp | |
| fn invoke adb-ucp adb-ucp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn config app adb-ucp DB_URL jdbc:oracle:thin:@ofunctions_tpurgent-DRCP?TNS_ADMIN=/tmp/wallet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ofunctions_tpurgent-DRCP = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522) | |
| (host=xxx.us-phoenix-1.oraclecloud.com) | |
| ) | |
| (connect_data=(service_name=xxx_ofunctions_tpurgent.atp.oraclecloud.com) | |
| (server = pooled) | |
| ) | |
| (security=(ssl_server_cert_dn="...")) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ofunctions_high = (...) | |
| ofunctions_low = (...) | |
| ofunctions_medium = (...) | |
| ofunctions_tp = (...) | |
| ofunctions_tpurgent = (...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.fn; | |
| import com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.oracle.bmc.Region; | |
| import com.oracle.bmc.auth.ResourcePrincipalAuthenticationDetailsProvider; | |
| import com.oracle.bmc.objectstorage.ObjectStorage; | |
| import com.oracle.bmc.objectstorage.ObjectStorageClient; | |
| import com.oracle.bmc.objectstorage.requests.GetObjectRequest; | |
| import com.oracle.bmc.objectstorage.requests.ListObjectsRequest; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class HelloFunction { | |
| private PoolDataSource poolDataSource; | |
| private UUID uuid = null; | |
| long t0,t1; | |
| int t; | |
| private final File walletDir = new File("/tmp", "wallet"); | |
| private final String namespace = System.getenv().get("NAMESPACE"); | |
| private final String bucketName = System.getenv().get("BUCKET_NAME"); | |
| private final String dbUser = System.getenv().get("DB_USER"); |
NewerOlder