Skip to content

Commit 0b03f0f

Browse files
committed
Updates to AoJ to reflect the changes in ADBA
1 parent df67952 commit 0b03f0f

File tree

7 files changed

+26
-535
lines changed

7 files changed

+26
-535
lines changed

java/AoJ/src/README.md

100755100644
Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,15 @@ better to get it to the community as soon as we could. We hope that you agree.
3636
## Building AoJ
3737

3838
AoJ and ADBA require JDK 9 or later. Download ADBA from the
39-
[OpenJDK sandbox](http://hg.openjdk.java.net/jdk/sandbox/file/9d3b0eb749a9/src/jdk.incubator.adba).
40-
It does not have any dependencies outside of Java SE. Download AoJ from
39+
[OpenJDK sandbox](http://hg.openjdk.java.net/jdk/sandbox/file/JDK-8188051-branch/src/jdk.incubator.adba/share/classes). It does not have any dependencies outside of Java SE.
40+
41+
For building the API modules:
42+
```
43+
$ mkdir -p mods/jdk.incubator.adba
44+
$ javac -d mods/jdk.incubator.adba/ $(find jdk.incubator.adba -name "*.java")
45+
$ jar --create --file=mlib/jdk.incubator.adba.jar --module-version=1.0 -C mods/jdk.incubator.adba/ .
46+
````
47+
Download AoJ from
4148
[GitHub](https://github.com/oracle/oracle-db-examples/tree/master/java/AoJ). Both
4249
are modularized so be sure to include the module-info.java files. AoJ depends on
4350
ADBA. The AoJ sample file depends on JUnit which is included with most IDEs but is
@@ -63,8 +70,8 @@ run with any JDBC driver connecting to a database with the scott schema. This is
6370
the last test in ```com.oracle.adbaoverjdbc.test.FirstLight.java```. For an
6471
introduction to ADBA see the [JavaOne 2017 presentation](http://www.oracle.com/technetwork/database/application-development/jdbc/con1491-3961036.pdf).
6572
66-
```
67-
public void transactionSample() {
73+
74+
```public void transactionSample() {
6875
// get the AoJ DataSourceFactory
6976
DataSourceFactory factory = DataSourceFactory.forName("com.oracle.adbaoverjdbc.DataSourceFactory");
7077
// get a DataSource and a Connection
@@ -106,12 +113,15 @@ introduction to ADBA see the [JavaOne 2017 presentation](http://www.oracle.com/t
106113
}
107114
// wait for the async tasks to complete before exiting
108115
ForkJoinPool.commonPool().awaitQuiescence(1, TimeUnit.MINUTES);
109-
}```
116+
}
117+
```
118+
119+
The following new sample code have been added: HellowWorld.java and NewEmptyJUnitTest.java.
110120

111121
## AoJ Design Spec in 100 words or less
112122

113123
The methods called by the user thread create a network
114-
([DAG](https://en.wikipedia.org/wiki/Directed_acyclic_graph)) of
124+
(i.e., [DAG](https://en.wikipedia.org/wiki/Directed_acyclic_graph)) of
115125
```CompletableFuture```s. These ```CompleteableFuture```s asynchronously execute
116126
the synchronous JDBC calls and the result processing code provided by the user
117127
code. By default AoJ uses ```ForkJoinPool.commonPool()``` to execute

0 commit comments

Comments
 (0)