如何组织 corda 节点和 GlassFish java 网络服务器之间的交互?
How to organize the interaction between a corda node and a GlassFish java web server?
我用的是corda平台,想用glassfish服务器,告诉我怎么组织corda节点和GlassFish的交互java web服务器?
查看 Spring 网络服务器示例 here 以获取与 Corda 节点交互的 Spring 引导网络服务器示例。 GlassFish 网络服务器的设计与此类似。
正在与节点通信:
密钥文件是https://github.com/corda/samples/blob/release-V3/spring-webserver/src/main/kotlin/net/corda/server/NodeRPCConnection.kt. Here, we create a long-lived CordaRPCClient
instance. The webserver's controllers use this client to send messages to and from the node, as shown here: https://github.com/corda/samples/blob/release-V3/spring-webserver/src/main/kotlin/net/corda/server/controllers/StandardController.kt。
依赖关系:
Web 服务器需要依赖 Corda 本身(对于核心 类 和 RPC 客户端 类)。参见 https://github.com/corda/samples/blob/release-V3/spring-webserver/build.gradle#L47。网络服务器还需要依赖任何包含控制器将使用的 类 的 CorDapps。例如,如果您有一个控制器,其端点从保管库中提取 IOUState
s,那么 IOUCorDapp
将是您的网络服务器的依赖项。
我用的是corda平台,想用glassfish服务器,告诉我怎么组织corda节点和GlassFish的交互java web服务器?
查看 Spring 网络服务器示例 here 以获取与 Corda 节点交互的 Spring 引导网络服务器示例。 GlassFish 网络服务器的设计与此类似。
正在与节点通信:
密钥文件是https://github.com/corda/samples/blob/release-V3/spring-webserver/src/main/kotlin/net/corda/server/NodeRPCConnection.kt. Here, we create a long-lived CordaRPCClient
instance. The webserver's controllers use this client to send messages to and from the node, as shown here: https://github.com/corda/samples/blob/release-V3/spring-webserver/src/main/kotlin/net/corda/server/controllers/StandardController.kt。
依赖关系:
Web 服务器需要依赖 Corda 本身(对于核心 类 和 RPC 客户端 类)。参见 https://github.com/corda/samples/blob/release-V3/spring-webserver/build.gradle#L47。网络服务器还需要依赖任何包含控制器将使用的 类 的 CorDapps。例如,如果您有一个控制器,其端点从保管库中提取 IOUState
s,那么 IOUCorDapp
将是您的网络服务器的依赖项。