Merge remote-tracking branch 'remotes/open/master' into mnesbit-merge-20180605

This commit is contained in:
Matthew Nesbit 2018-06-05 13:37:35 +01:00
commit 4882e2e089
8 changed files with 17 additions and 35 deletions

View File

@ -11,6 +11,7 @@ see changes to this list.
* acetheultimate
* Adrian Fletcher (TD)
* agoldvarg
* Ajitha Thayaharan (BCS Technology International)
* Alberto Arri (R3)
* amiracam
* Andras Slemmer (R3)

View File

@ -304,7 +304,6 @@ An example ``web-server.conf`` file is as follow:
address : "my-corda-node:10003"
adminAddress : "my-corda-node:10004"
}
webAddress : "localhost:12347",
rpcUsers : [{ username=user1, password=letmein, permissions=[ StartFlow.net.corda.protocols.CashProtocol ] }]
Configuring a node where the Corda Comatability Zone's registration and Network Map services exist on different URLs
@ -347,8 +346,6 @@ path to the node's base directory.
:trustStoreFile: absolute path to the trust store, defaulted to ``certificatesDirectory / "truststore.jks"``.
:trustStoreFile: absolute path to the trust store, defaulted to ``certificatesDirectory / "truststore.jks"``.
:webAddress: The host and port on which the webserver will listen if it is started. This is not used by the node itself.
:rpcUsers: A list of users who are authorised to access the RPC system. Each user in the list is a config object with the
following fields:

View File

@ -87,7 +87,7 @@ Run from the command prompt
1. From the cordapp-example folder, deploy the nodes by running ``gradlew deployNodes``
2. Start the nodes by running ``call kotlin-source/build/nodes/runnodes.bat``
3. Wait until all the terminal windows display either "Webserver started up in XX.X sec" or "Node for "NodeC" started up and registered in XX.XX sec"
4. Test the CorDapp is running correctly by visiting the front end at http://localhost:10007/web/example/
4. Test the CorDapp is running correctly by visiting the front end at http://localhost:10009/web/example/
Run from IntelliJ
^^^^^^^^^^^^^^^^^
@ -98,7 +98,7 @@ Run from IntelliJ
3. Once the project is open, click ``File``, then ``Project Structure``. Under ``Project SDK:``, set the project SDK by
clicking ``New...``, clicking ``JDK``, and navigating to ``C:\\Program Files\\Java\\jdk1.8.0_XXX`` (where ``XXX`` is
the latest minor version number). Click "OK"
the latest minor version number). Click ``OK``
4. Again under ``File`` then ``Project Structure``, select ``Modules``. Click ``+``, then ``Import Module``, then select
the ``cordapp-example`` folder and click ``Open``. Choose to ``Import module from external model``, select
``Gradle``, click ``Next`` then ``Finish`` (leaving the defaults) and ``OK``
@ -107,7 +107,7 @@ Run from IntelliJ
6. At the top-right of the screen, to the left of the green ``play`` arrow, you should see a dropdown. In that
dropdown, select ``Run Example Cordapp - Kotlin`` and click the green ``play`` arrow.
7. Wait until the run windows displays the message ``Webserver started up in XX.X sec``
8. Test the CorDapp is running correctly by visiting the front end at `http://localhost:10007/web/example/
8. Test the CorDapp is running correctly by visiting the front end at `http://localhost:10009/web/example/
.. _mac-label:
@ -141,7 +141,7 @@ Run from the terminal
1. From the cordapp-example folder, deploy the nodes by running ``./gradlew deployNodes``
2. Start the nodes by running ``kotlin-source/build/nodes/runnodes``. Do not click while 8 additional terminal windows start up.
3. Wait until all the terminal windows display either "Webserver started up in XX.X sec" or "Node for "NodeC" started up and registered in XX.XX sec"
4. Test the CorDapp is running correctly by visiting the front end at http://localhost:10007/web/example/
4. Test the CorDapp is running correctly by visiting the front end at http://localhost:10009/web/example/
Run from IntelliJ
^^^^^^^^^^^^^^^^^
@ -152,7 +152,7 @@ Run from IntelliJ
3. Once the project is open, click ``File``, then ``Project Structure``. Under ``Project SDK:``, set the project SDK by
clicking ``New...``, clicking ``JDK``, and navigating to ``C:\\Program Files\\Java\\jdk1.8.0_XXX`` (where ``XXX`` is
the latest minor version number). Click "OK"
the latest minor version number). Click ``OK``
4. Again under ``File`` then ``Project Structure``, select ``Modules``. Click ``+``, then ``Import Module``, then select
the ``cordapp-example`` folder and click ``Open``. Choose to ``Import module from external model``, select
``Gradle``, click ``Next`` then ``Finish`` (leaving the defaults) and ``OK``
@ -161,7 +161,7 @@ Run from IntelliJ
6. At the top-right of the screen, to the left of the green ``play`` arrow, you should see a dropdown. In that
dropdown, select ``Run Example Cordapp - Kotlin`` and click the green ``play`` arrow.
7. Wait until the run windows displays the message ``Webserver started up in XX.X sec``
8. Test the CorDapp is running correctly by visiting the front end at http://localhost:10007/web/example/
8. Test the CorDapp is running correctly by visiting the front end at http://localhost:10009/web/example/
Corda source code
-----------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -39,38 +39,21 @@ Opening the example CorDapp in IntelliJ
---------------------------------------
Let's open the example CorDapp in IntelliJ IDEA:
**If opening a fresh IntelliJ instance**:
* Open IntelliJ
* A dialogue box will appear:
.. image:: resources/intellij-welcome.png
:width: 400
* A splash screen will appear. Click ``open``, navigate to the folder where you cloned the ``cordapp-example``, and
click ``OK``
* Click open, navigate to the folder where you cloned the ``cordapp-example``, and click OK
* Once the project is open, click ``File``, then ``Project Structure``. Under ``Project SDK:``, set the project SDK by
clicking ``New...``, clicking ``JDK``, and navigating to ``C:\Program Files\Java\jdk1.8.0_XXX`` (where ``XXX`` is the
latest minor version number). Click ``OK``
* IntelliJ will show several pop-up windows, one of which requires our attention:
.. image:: resources/unlinked-gradle-project.png
:width: 400
* Click the 'import gradle project' link. Press OK on the dialogue that pops up
* Again under ``File`` then ``Project Structure``, select ``Modules``. Click ``+``, then ``Import Module``, then select
the ``cordapp-example`` folder and click ``Open``. Choose to ``Import module from external model``, select
``Gradle``, click ``Next`` then ``Finish`` (leaving the defaults) and ``OK``
* Gradle will now download all the project dependencies and perform some indexing. This usually takes a minute or so
* If the 'import gradle project' pop-up does not appear, click the small green speech bubble at the bottom-right of
the IDE, or simply close and re-open IntelliJ again to make it reappear
**If you already have IntelliJ open**:
* Open the ``File`` menu
* Navigate to ``Open ...``
* Navigate to the directory where you cloned the ``cordapp-example``
* Click OK
Project structure
~~~~~~~~~~~~~~~~~
The example CorDapp has the following structure:

View File

@ -78,7 +78,7 @@ class AMQPClient(val targets: List<NetworkHostAndPort>,
val log = contextLogger()
const val MIN_RETRY_INTERVAL = 1000L
const val MAX_RETRY_INTERVAL = 300000L
const val MAX_RETRY_INTERVAL = 60000L
const val BACKOFF_MULTIPLIER = 2L
const val NUM_CLIENT_THREADS = 2
}

View File

@ -342,6 +342,7 @@ class P2PMessagingClient(val config: NodeConfiguration,
}
val queues = session.addressQuery(SimpleString("$PEERS_PREFIX#")).queueNames
knownQueues.clear()
for (queue in queues) {
val queueQuery = session.queueQuery(queue)
if (!config.lazyBridgeStart || queueQuery.messageCount > 0) {