How to pause SFTP Connector in Mule ESB CE - sftp

I need to pause a SFTP Connector from polling and then restart it after a specified interval, in Mule ESB CE 3.2.1.
Do you know if it's possible, by using Mule's API if necessary?
And, if it was possible, how could I disconnect and reconnect an SFTP client?
Thanks in advance,
Gabriele

I suggest you first try to practice pausing/stopping/starting through JMX, in order to determine exactly what Mule component you want to interact with (the SFTP connector? the flow that uses the connector? just the SFTP inbound endpoint?).
When you have decided exactly what it is you want to do, you can then either do it:
Through JMX calls in the JVM directly on the Mule MBeans,
Through Mule API calls starting by locating the target components in the registry.

Related

Starting a flow using Corda RPC

By reading the docs, it is clear that the only way to interact with corda is via RPC. If you want to interact via http, then we have to write a web server exposing specific endpoints.
I am trying to write a rpc client to start a flow in the cordapp without webserver.
rpcOps.startTrackedFlowDynamic(ExampleFlow.Initiator.class, iouValue, otherParty)
I couldn't understand properly here. Should I duplicate the ExampleFlow class both on client end and in the cordapp? What is the structure of rpcclient and cordapp in this case of not having a web server?
tl;dr Write a client to start a flow on already running corda node without webserver? Thanks
Yes - currently, the client must depend on ExampleFlow.Initiator and have it available on the classpath. This is true whether it's a webserver or a regular command line client.

Corda: Can we develop Dapps that will be run by IIS webserver to talk to Corda platform?

We have used "Yo!CorDapp" example (https://github.com/corda/spring-observable-stream) to build a POC.
In this POC, can we replace angular by .NET for frontend and use IIS webserver in place of springboot webserver to talk to Corda platform?
Thanks
You can use any front-end technology you want.
As of Corda 3, your backend must be JVM-based, for two reasons:
You need to load various flow, state and other class definitions onto the classpath to pass as arguments to flows, retrieve objects from the vault, etc.
You need to use the CordaRPCClient library to create an RPC connection to the node
If you really need to write your back-end in another language, there are a few workarounds:
Create a thin Java webserver that sits between your main webserver and the node. The Java webserver translates HTTP requests from the main webserver into RPC calls to the node, and RPC responses from the node into HTTP responses to the main webserver
This is the approach taken by libraries such as Braid
Use a library such as GraalVM to compile non-JVM languages to JVM bytecode
An example of writing a JVM webserver in Javascript using GraalVM is available here: https://github.com/nitesh7sid/cordapp-example-nodejs-server-graalvm

Is there a way to tell if a Corda node goes down?

I have an application connected to a Corda node using CordaRPC. If I stop the Corda node, I can't see a good way to detect that from my app. Eventually, if I try to call an RPC function, I get an error. Is there any low-level way to detect a lost connection?
As of Corda 3.1, no. There is no exposed API to detect a lost connection.

MSMQ access from mainframe? REST API maybe?

I need to put and get messages to/from our remote MSMQ, but because we will do the put s from our mainframe, we need a way that can be implemented in COBOL(or PL/1 maybe). My questions are;
1) Is it possible to enable HTTP GET/POST requests to put/get messages without WCF implementations? That is, we need to be simply able to make requests as in
http://our_server:port/msmq/queue1?operation=put&message=test_message&...
2) Is there any other way to access and put messages into MSMQ from mainframe?
Any suggestions will be appreciated
Thanks in advance
EDIT
I think I couldn' t tell what I want exactly. I have data on mainframe and I want to put these data into a MSMQ which is running on a Windows machine. IBM WebsphereMQ has WebSphere MQ bridge for HTTP so that it accepts HTTP requests and puts the requests' payload into queue. Does MSMQ have such a feature?
Thanks again :)
You can use the EZAPI interface programs to manage the traffic natively in your COBOL programs or use one of the many variants of MSMQ to WebsphereMQ or JMS.
The EZAPI stuff will let you do the direct http puts, but you will need to manage it all.
Why not just hook the MSMQ into whatever queueing software you have on the mainframe and make it work the way it was intended?
If your mainframe applications are running in CICS, then HTTP client requests are just API calls. Where I work, we've been doing this in COBOL applications since 2006.

How to connect Adobe Air client side with Java VM Debug Interface?

I'd like to know if/how would it be possible to connect Adobe Air application to Java VM Debug Interface? I have some objects residing on server side and don't want to change the code there and server already allows to do remote debugging.
Here's the information about JPDA:
http://www.j2ee.me/j2se/1.3/docs/guide/jpda/architecture.html
Greatly appreciate for your advice in advance.
Be very careful about opening the remote debugging interface to the Internet. That could be a huge security problem.
Security considerations aside, only a single debugger process can attach to the JVM at the same time.
You should really look at some of the more regular remoting protocols, such as SOAP or REST over HTTP(S) to talk to your server. This is not more work (probably less) than trying to shoe-horn JPDA into something it was not meant to do.

Resources