Вопрос

I am looking for a java API to access mainframe remotely. I am looking for something similar to JTOpen or IBM Toolbox for iseries systems. Through this API, I should be able to connect to the mainframes and fetch information from the mainframe, something like this -

public static void main(String[] args){
    Mainframe myMainframe = new Mainframe(ipAddress, userName, password);
    myMainframe.connect();
    System.out.println(myMainframe.getSystemName);
    myMainframe.disconnect();
}
Это было полезно?

Решение

Look at JMX. It's provide API for building distributed systems. I belive it can be used in your Mainframe environment. It's server-client model. You can write interface like:

public interface MainframeMXBean {
    public String getName();
}

and implement it in your Mainframe class, then create proxy for local usage:

MainframeMXBean remoteMF = JMX.newMXBeanProxy(connection, jmxName, MainFrameMXBean.class);
System.out.println(remoteMF.getName());

Другие советы

The Java Management Extensions (JMX) should be sufficiently widespread and generic to satisfy your need.

Here is an official online example set. Also, you can find an O'Reilly book about it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top