AoJ : ADBA Over JDBC

Douglas Surber douglas.surber at oracle.com
Tue Apr 10 14:59:12 UTC 2018


Some people have asked what AoJ supports. About the only answer I have is “try it and see”. The sample code in the README works. There are many variations on that code that should work. If you get FeatureNotSupportedException, then whatever it was you tried is not supported. If you don’t get FeatureNotSupportedException but it does the wrong thing then either it is not supported or there is a bug. 

Basic stuff in the following types should work:
  - DataSourceFactory
  - DataSource
  - Connection
  - OperationGroup (minimal, mostly what is needed for Connection)
  - ParameterizedRowOperation
  - Result.Row
  - ParameterizedCountOperation
  - Result.Count
  - Transaction

CompletionStage parameters work. Most data types work. Commit and rollback work. Validation might work. Creating an OperationGroup might work.. Error handling might work but I wouldn’t bet on it. Cancel might work but I wouldn’t bet on it.

People have asked for an overview of the implementation. At some level it is pretty simple. The methods called by the user thread construct a network of CompletionStages. When the Connection is submitted the head of the network is triggered and the CompletionStages are executed. The CompletionStages make the JDBC calls and execute the user provided code to process the results. So the trick to understanding the code is to separate it into two levels: the user thread level that constructs the network and the async level that does the work. It would be nice if the IDE would let me apply colors to the two different levels, but alas. 

If you want something to work on, the two biggest needs are implementing logging and adding tests.

Douglas


More information about the jdbc-spec-discuss mailing list