Is it possible to use a Java class as a security exit program? All the documentation refers to libraryname(functionname) or dllname(functionname). I would like to have jarname(classname) or something. Can this be done using the MQ for Java classes which have the exit interfaces?
Thanks. I have been searching. The information that I'm missing is:
1. can a security exit program, written in Java, be assigned to a channel of a queue manager?
All the documentation in the Java (csqzaw17.pdf) PDF seems to relate to creating an MQ client which implements the MQSecurityExit.
Ideally, the security exit would be on the channel in the QueueManager so that clients do not have to be changed to do their own security (which makes little sense in any case.)
2. If it is possible to use a Java program for a security exit on a queue manager channel, how is that to be specified? If I were to use the WebSphere MQ Explorer for instance, how do I refer to the Java class the implements MQSecurityExit?
AFAIK, MQ exits written in Java can only be used from Java Clients. They cannot be used on other types of MQ channel or environments. For portability, MQ exits are normally written in ANSI C.
Thanks for responding. I have been working with the source code to BlockIP2 and frankly, the idea that C code is portable is debatable. This one C source file has 10,000 lines half of which are #ifdef blah to handle "portability". Java clearly would be better for portability as well as ease of maintenance. Reading about the MQSecurityExit interface really gave me hope! I'll try sending a feature request to IBM for WebSphere MQ to add support for Java apps as exits. Who knows, maybe they'll do it!
>Java clearly would be better for portability as well as ease of maintenance.
I don't agree. Java programs nearly always require the correct version of JVM to be carted around with them. MQ is not written in Java so it would be very unlikely that Java exits on message channel agents would be supported.
C is a superior language to Java for systems programming tasks such as MQ exits as C provides low level interfaces to operating system services and can make direct use of pointers and structures. Its also much faster and less memory intensive than Java. ie. there is no garbage collection in C.
I have a very complex MQ channel exit written in C that compiles on Windows, 4 different Unix's and z/OS. Only about 1% of the code has #ifdef for platform specifics, mainly for Windows.
Glenn.
Tags
Use the search field to
find all types of content in My developerWorks with that tag.
Use the slider bar to see more or fewer tags.
Popular tags shows the top tags for this particular type of content or application that you're viewing.
My tags shows your tags for this particular type of content or application that
you're viewing.