Is there a Java Binding for LMIShell?

An interesting question just came up: “is there a Java binding for LMIShell?”

Hmm, good question – let’s answer it by digging into the OpenLMI architecture a bit.

LMIShell is a client framework written in Python. It consists of a Python language binding to the OpenLMI WBEM interface (which is CIM XML over https) which presents the OpenLMI objects as native Python objects, a set of helper functions, a set of task oriented management scripts, and a task oriented CLI interface.

LMIShell is designed to be extended by adding new management scripts (also written in Python) and CLI calls.

Java also has a language binding to the OpenLMI WBEM interface. In fact, since this is Linux, there are two of them… The Java language bindings are provided by the sblim-cim-client and sblim-cim-client2 packages. Both of these packages provide a CIM Client Class Library for Java applications which is compliant with the JCP JSR48 specification. Details about the Java Community Process and JSR48 can be found at http://www.jcp.org and http://www.jcp.org/en/jsr/detail?id=48. Note that documentation and examples are available – see the sblim-cim-client2-manual package.

Thus, there is a direct interface to the OpenLMI API from Java. An entire client application can be written in Java – in fact, there was discussion of whether LMIShell should be implemented in Python or Java.

If you want to use the LMIShell CLI from Java, that is straightforward. If you want to call LMIShell functions from Java, it can be done but is a little trickier. If you want to write a Java application directly against the OpenLMI API, use the Java language binding.

In many cases the easiest answer is likely to be to look at the LMIShell modules to see how they call the OpenLMI API, and then implement the function directly in Java using the Java language binding.

About Russell Doty

A technology strategist and product manager at Red Hat, working on the next generation of open source systems.
This entry was posted in System Management. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s