Commit Graph

4339 Commits

Author SHA1 Message Date
Clinton Alexander
9664828e6e Upgraded to gradle 4.1. 2017-08-23 15:36:08 +01:00
Matthew Nesbit
0c65e5e708 Merge pull request #1311 from corda/mnesbit-explain-issued
Attempt to explain the Issued class
2017-08-23 15:32:48 +01:00
Matthew Nesbit
e26f23b402 Attempt to explain the Issued class
Fix typo
2017-08-23 15:02:38 +01:00
Rick Parker
0458e5415a java.time.* custom AMQP serializers and tests. Excludes pure enums. (#1308)
* java.time.* custom AMQP serializers and tests.  Excludes pure enums.

* Register java.time.* serializers with scheme.

* Provide default implementation of `additionalSerializers`
2017-08-23 12:08:09 +01:00
mkit
62c78d5ef3 Upgrading Quasar to version 0.7.9 (#1309) 2017-08-23 12:03:35 +01:00
Viktor Kolomeyko
86fdbb9f22 Make OpaqueBytesSubSequence AMQP serializable (#1303) 2017-08-23 08:40:09 +01:00
josecoll
458d2e32c0 Pluggable cash selection using H2 as default implementation. (#1300)
* Pluggable cash selection using H2 as default implementation.

* Refactor to use own CashSelection service loader and associated isCompatible() check.

* Determine Cash Selection algorithm to use based on JDBC Driver loaded.
Lazily load JDBC Driver metadata and class implementation.

* Rebased and adjusted package naming to include `finance`

* Rebased and adjusted package naming to include `finance`

* Added some documentation.
Minor fixes and changes following PR review.

* Return cashSelectionAlgo.
Throw exception rather than setting in atomically referenced object.
2017-08-22 18:09:23 +01:00
mkit
dce17ed272 Fixing trader demo docs. After recent refactoring they've become out of sync. (#1298) 2017-08-22 17:42:07 +01:00
Viktor Kolomeyko
66e6f90140 Make WireTransaction @CordaSerializable (#1299)
And do everything necessary for AttachmentClassLoaderTests to be passing in AMQP mode

* Changes following code review by @fenryka and @rick-r3
2017-08-22 16:53:55 +01:00
Matthew Nesbit
738f288428 Merge pull request #1301 from corda/mnesbit-finance-package2
Rename finance module to own package
2017-08-22 14:29:23 +01:00
Matthew Nesbit
c86e78599f Rename finance module to own package
Fixup after rebase

Correct bad merges

Fixup docs

Fix integration test

Correct doc references to finance
2017-08-22 13:25:31 +01:00
szymonsztuka
709495957d rewrite NodeMessagingClient to use Hibernate 2017-08-22 13:22:15 +01:00
szymonsztuka
09adba8275 Hibernate session leak fix
* Hibernate session was not closed when JDBC connection was closed

* combined few instances of HibernateSession objects into one field inside CordaPersistence 

* HibernateConfiguration improved caching of schema factories
2017-08-22 13:08:36 +01:00
mkit
a4052f9126 Adding permissions for flow execution (#1297)
* Adding permissions for flow execution

* Addressing review comments
2017-08-22 10:24:57 +01:00
Viktor Kolomeyko
970ecf1bae Extend unit test to cover SecureHash and Opaque bytes 2017-08-22 10:04:36 +01:00
Konstantinos Chalkias
1a4d908b63 Remove grouping from FungibleAsset (Issue and Move) (#1185)
Clean-up FungibleAsset - remove Command grouping and get rid of IssueCommand as no nonce is required anymore.
2017-08-21 16:14:04 +01:00
Chris Rankin
b33e299e3a Refactor serialisation contexts into separate classes, according to their use-cases. (#1293)
* Refactor Kryo contexts into separate classes, according to their use-cases. This prevents Kotlin from trying to instantiate them all every time.
* Also refactor AMQP contexts accordingly.
* Expand comments to explain why these serialisation contexts have been separated.
2017-08-21 14:19:21 +01:00
mkit
2744079b4b Removing usages of the deprecated CashFlowCommand (#1289)
* Removing usages of the deprecated CashFlowCommand

* Addressing review comments
2017-08-21 13:32:08 +01:00
josecoll
b5d844c4ca Completely remove any trace of node-schemas. (#1291) 2017-08-21 13:08:14 +01:00
Rick Parker
cbef5d6a2d Fix flakey RPC tests (#1292) 2017-08-21 13:05:25 +01:00
szymonsztuka
c3c2ffcc2f rewrite PersistentNetworkMapService to use Hibernate 2017-08-21 12:22:16 +01:00
Chris Rankin
f364f3aaee Install the finance module as a CorDapp into every DemoBench node. (#1290) 2017-08-21 11:51:23 +01:00
josecoll
a2ede0fc73 Requery removal (#1276)
* Removed Requery object relational mapping usage (and associated schemas including node-schemas module)

* Fixed issues with NodeAttachmentService tests.
Cannot use JPA custom converters with Primary Key fields.
Hibernate entities require explicit call to flush() to persist to disk.

* Removed redundant requery converters (equivalents not even required in Hibernate).

* Removed remaining gradle requery dependency definitions.

* Fixed broken tests.

* Fixes for failing NodeVaultService tests:
- Dynamic SQL updates (in soft locking code)
- Explicit request by session to participate in transaction (causing "TransactionRequiredException" Executing an update/delete query)
- Explicit flush() required to persist to disk

* Updated changelog.
Fixed compiler warning.

* Fixed WHERE clause AND/OR condition.
Enforced immediate data visibility through transaction commit.

* Final fixes to address failing tests.

* Deferred all hibernate session/txn management to DatabaseTransactionManager.

* Fixed transaction boundaries in failing Cash tests.

* Fixes to address failing tests (transaction boundaries, merge detached object, config clean-up).

* Final adjustment to transaction boundaries in JUnit tests.

* Refactored AttachmentSchemaV1 into NodeAttachmentService itself and referenced from NodeServicesV1.

* Refactored HSQL UPDATE statements to use CriteriaUpdate API.

* Updated all criteria API getters to reference attribute names by type.

* Remove redundant VaultSchema entity name (required when previously using HSQL UPDATE syntax)

* Fix compiler warnings.

* Minor changes following rebase from master.

* Fixed suppress warning type.
2017-08-21 10:42:59 +01:00
Rick Parker
56a84882a7 AMQP fixes: Don't attempt to include non-serializable interfaces in schemas (#1281)
* Ignore interfaces that are not serializable

* Annotate so test still works.

* Make methods accessible to serializer.

* Make sure interfaces are annotated in the carpenter.  Expand tests to check whitelisting.  Object is now whitelisted by default since it has no fields.

* Prevented Object from being whitelisted but allow arrays of Objects (i.e. pretty much an untyped array)
2017-08-21 10:27:27 +01:00
Viktor Kolomeyko
06ad2ddd45 Eliminate warnings in Java and Kotlin code
Functionally this change is a NOP
2017-08-21 09:36:24 +01:00
Matthew Nesbit
82173bc1a7 Merge pull request #1265 from corda/mnesbit-nofinance-jacksonapi
Remove finance dependencies in node and client/jackson and make finance a CorDapp.
2017-08-18 16:17:36 +01:00
Viktor Kolomeyko
ee76de0957 Resolve a problem when Exceptions with suppression passed through Kryo serialization (#1280)
Also added some unit tests that expose the problem
2017-08-18 15:58:35 +01:00
Matthew Nesbit
8ec33d67e4 Remove finance dependencies
Re-enable code now DealState PR is in.

Add plugable JSON serialisation

Add docs for new plugin api.

Move parseCurrency back to core to prevent dependency issues with crash shell parsing.

Use :finance module as a proper CorDapp

Move parseCurrency back onto Amount companion.

Fix smoke tests

Fixup after merge.
2017-08-18 14:27:49 +01:00
szymonsztuka
4278bce5c8 rewrite NodeSchedulerService to use Hibernate 2017-08-18 14:20:17 +01:00
Andrzej Cichocki
adc33273f6 Make virtualenv installable if the checkout path has whitespace. (#1187) 2017-08-18 13:31:00 +01:00
Andrzej Cichocki
2829faa01f Retire legalContractReference (#1188)
* Add LegalProseReference annotation
* Migrate code from autogenerated javascript to TypeScript source
* Add instructions to rebuild the web resources
* Make installWeb more reproducible
2017-08-18 13:30:39 +01:00
Mike Hearn
d22cdac2dd Move some extension methods for summing to new locations.
This improves the Java API and makes it more idiomatic. The methods
were not moved to be static methods of the relevant types in all cases
due to a bad interaction with a Kotlin auto-completion bug, and because
static methods on interfaces are new in Java 8 and Kotlin is not yet
emitting Java 8 bytecode.

Also, introduce a packages.md file so packages can be documented.
2017-08-18 12:39:12 +02:00
mkit
ec83735ea3 Adding hint on how to fix the 'not instrumented' error message (#1274)
* Adding hint on how to fix the 'not instrumented' error message

* Addressing review comments
2017-08-18 10:16:16 +01:00
Viktor Kolomeyko
5864a22d05 Move dependency on "proton-j" library from "core" sub-project to "node-api" 2017-08-18 09:49:46 +01:00
Patrick Kuo
ae85759067 Added notifyVault flag to recordTransaction and skip notify for irrelevant TX (#1250)
* Add notifyVault flag to recordTransaction to skip notifying the vault for transactions from ResolveTransactionFlow.

* added methods for use in Java

* reverted format changes

* addressed PR issues
changed recordTransaction method signature
2017-08-18 09:46:59 +01:00
Andrzej Cichocki
e49d3aa834 Use native VisibleForTesting everywhere. (#1189) 2017-08-17 18:05:19 +01:00
Viktor Kolomeyko
51ed943272 Remove SerializationFactory parameter from the places where it is not needed
Also minor improvements to the looping/if-branching code and documentation changes

Functionally, this change is a NOP
2017-08-17 17:53:40 +01:00
Viktor Kolomeyko
4a3848cc2a Delete KryoAMQPSerializer and its registration
As discussed with @rick-r3 this class is no longer fit for purpose because it may break reference equality if part of the graph been serialized with Kryo and part with AMQP
2017-08-17 17:52:47 +01:00
Joel Dudley
734b48bad1 Fixes indentation of note box. 2017-08-17 17:26:10 +01:00
Katelyn Baker
33dee5616f Merge pull request #1210 from corda/feature/kat/changeContainerSerialisation
Change container serialisation to allow concrete types in classes
2017-08-17 14:49:51 +01:00
Katelyn Baker
e6e6644fc9 Fixes to bring into line with changes API
Can't have default factories now, they need building with whitelist and
classloader.

Also remove completely spurious import that broke everything, have a
feeling that was something IntelliJ pulled in "to be helpful"
2017-08-17 14:17:59 +01:00
Katelyn Baker
6076d39ee4 Remove spurious printlns 2017-08-17 13:53:35 +01:00
Katelyn Baker
c72ac2a102 Add WeakHashMap to the blacklist 2017-08-17 13:53:35 +01:00
Katelyn Baker
8bebd6ea0b Rework To better deal with types we won't serialise
* Add depricated jvm types to the blacklist
* Add concrete types for user convenience
* Add better "We won't serialise this because" error handling
2017-08-17 13:53:35 +01:00
Katelyn Baker
d2933ca8a3 Finalise which map containers to serialize 2017-08-17 13:53:35 +01:00
Katelyn Baker
de05a11511 Move toward allowing serialisation of concrete types 2017-08-17 13:53:35 +01:00
Katelyn Baker
4b8d6e32c3 Merge pull request #1269 from corda/bugfix/kat/missingFactory
Re-re-move Java test to the correct location, fix compile issue
2017-08-17 13:25:30 +01:00
mkit
204b2fc556 Use String instead of Class for the flowClass (#1270) 2017-08-17 12:59:24 +01:00
Joel Dudley
4eb58b874a Additional fixes to the tutorial. 2017-08-17 12:02:44 +01:00
Viktor Kolomeyko
4286065872 Eliminate explicit Kryo configuration to allow flexibility for AMQP 2017-08-17 12:01:27 +01:00