문제

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