IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Special need to set classpath within java service

  • 1.  Special need to set classpath within java service

    Posted Thu May 22, 2008 05:26 PM

    Good morning.

    We’re having network multi-homing issues while using the kerberos4 libraries (“ticket granting” and “service granting” calls occasionally use different IP adapters). We have instrumented a test KDC server but only want to use it for calls from one particular package. The kerberos libraries can be instructed to use a specific KDC via a configuration file (krb.con) which can either be located where the libraries are, or somewhere in the classpath in use at the time of the kerberos calls.

    Putting the file where the libraries live would alter the way the entire Integration Server operates and is therefore not a viable solution.

    I have dumped the classpath (System.getProperty(“java.class.path”)) in play when my java service runs and it is:

     :/global/webMethods6/java/lib/dt.jar:/global/webMethods6/java/lib/i18n.jar:/global/webMethods6/java/jre/lib/rt.jar:/opt/webMethods6/IntegrationServer/lib/proxy.jar:/opt/webMethods6/jvm/sol142/lib/tools.jar

    I don’t see where my package’s location appears anywhere in the path. As the universal suggestion on getting custom classes and jars in play for a package is to place them in “myPackage/code/classes” and “myPackage/code/jars”, I have to assume the Integration Server is finessing the classpath in the background. This works the vast majority of the time WHEN THE ITEM IN QUESTION IS A RECOGNIZED JAVA TYPE (.class, .jar, …), but does not seem to work for my krb.con, a file type significant to kerberos.

    The issue I have is that I need this particular file to be in an explicit classpath specific to my package. Is there a way either by using the developer tool or by java code within the service itself to pre-pend the krb.con location to the service’s classpath?

    Thanks in advance,

    John A. Parker

    Cornell University
    Programmer Analyst Specialist
    jap54@cornell.edu
    607-255-9356


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Special need to set classpath within java service

    Posted Fri May 23, 2008 02:04 PM

    Modify the server.sh startup script (server.bat in Windows) to add the file you want to the prependToClassPath(sp?) environment variable. You should then see the modified classpath in the IS Admin server’s About link. Not sure that will fix your issue, but that is how to add a file with a nonstandard extension to the cp.

    Mark


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods