Skip to content

Commit 36bc6fc

Browse files
authored
WIP: Update sample code (#440)
* update doc, etc. Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com>
1 parent b73fd74 commit 36bc6fc

File tree

15 files changed

+74
-219
lines changed

15 files changed

+74
-219
lines changed

code-teq/javaTeq/pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Copyright (c) 2022, Oracle and/or its affiliates. -->
3+
<!-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -->
24
<project xmlns="http://maven.apache.org/POM/4.0.0"
35
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
46
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
57
<modelVersion>4.0.0</modelVersion>
68

7-
89
<groupId>com.oracle.example</groupId>
910
<artifactId>teq</artifactId>
1011
<version>0.0.1-SNAPSHOT</version>
1112
<name>teq</name>
1213
<description>TEQ examples</description>
1314

1415
<properties>
16+
<!-- Use Java 8 or later -->
1517
<maven.compiler.target>17</maven.compiler.target>
1618
<maven.compiler.source>17</maven.compiler.source>
1719
</properties>

code-teq/javaTeq/src/main/java/com/oracle/example/ConsumeTEQ.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright (c) 2022, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
// This is an example of how to consume a message from a TEQ using Java.
5+
// Please see the Maven POM file for dependencies.
6+
17
package com.oracle.example;
28

39
import java.sql.SQLException;

code-teq/javaTeq/src/main/java/com/oracle/example/CreateTEQ.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright (c) 2022, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
// This is an example of how to create a TEQ using Java.
5+
// Please see the Maven POM file for dependencies.
6+
17
package com.oracle.example;
28

39
import java.sql.SQLException;

code-teq/javaTeq/src/main/java/com/oracle/example/PublishTEQ.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright (c) 2022, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
// This is an example of how to publish a message onto a TEQ using Java.
5+
// Please see the Maven POM file for dependencies.
6+
17
package com.oracle.example;
28

39
import java.sql.SQLException;

code-teq/nodeTeq/dequeueTEQ.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
// Copyright (c) 2022, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
14
//
2-
// This sample demonstrates how to enqueue a message onto a TEQ using PL/SQL
5+
// This sample demonstrates how to dequeue a message from a TEQ using JavaScript/Node
36
//
47

58
// There are various payload types supported, including user-defined object, raw, JMS and JSON.
69
// This sample uses the RAW payload type.
710

811
// Execute permission on dbms_aq is required.
12+
// The node module 'oracledb' must be installed, e.g. with npm
913

1014
const oracledb = require('oracledb');
1115

code-teq/nodeTeq/enqueueTEQ.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
// Copyright (c) 2022, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
14
//
2-
// This sample demonstrates how to enqueue a message onto a TEQ using PL/SQL
5+
// This sample demonstrates how to enqueue a message onto a TEQ using JavaScript/Node
36
//
47

58
// There are various payload types supported, including user-defined object, raw, JMS and JSON.
69
// This sample uses the RAW payload type.
710

811
// Execute permission on dbms_aq is required.
12+
// The node module 'oracledb' must be installed, e.g. with npm
913

1014
const oracledb = require('oracledb');
1115

code-teq/plsqlTeq/cleanupTEQ.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- Copyright (c) 2022, Oracle and/or its affiliates.
2+
-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
14
--
25
-- This sample demonstrates how to remove (clean up) a TEQ using PL/SQL
36
--

code-teq/plsqlTeq/createTEQ.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- Copyright (c) 2022, Oracle and/or its affiliates.
2+
-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
14
--
25
-- This sample demonstrates how to create a TEQ using PL/SQL
36
--

code-teq/plsqlTeq/dequeueTEQ.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
-- Copyright (c) 2022, Oracle and/or its affiliates.
2+
-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
13
--
2-
-- This sample demonstrates how to enqueue a message onto a TEQ using PL/SQL
4+
-- This sample demonstrates how to dequeue a message from a TEQ using PL/SQL
35
--
46

57
-- There are various payload types supported, including user-defined object, raw, JMS and JSON.

code-teq/plsqlTeq/enqueueTEQ.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- Copyright (c) 2022, Oracle and/or its affiliates.
2+
-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
14
--
25
-- This sample demonstrates how to enqueue a message onto a TEQ using PL/SQL
36
--

0 commit comments

Comments
 (0)