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
  • 1.  Linking java services from another package

    Posted Thu March 18, 2004 04:57 PM

    Hi all,

    How can I use a java service that I created in
    another package without use invoke ???

    I want import the class just like another one.

    best regards,

    Sebastián Miranda
    Barcelona, Spain


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


  • 2.  RE: Linking java services from another package

    Posted Tue April 13, 2004 12:12 PM

    Hi Sebastian,

    I do not know if you have discovered a way, but we have been playing with Java Services and classes and loaders etc.

    For a webMethods Package, the (Java Service) classes in it are only accessible from within the package (classloaders and all that). So you either have to get in the package (doInvoke) or make the classes available outside of the webMethods package.

    The one way we can achieve what you want is to collect all the class files up from the ‘other’ package, jar them up and put them on either the system classpath, the ‘prependclasses’ path or in the IS lib/jar(s) directory. The side effect of this is that the package is then not hot deployable, and changes to if required a restart.
    Alternatively, create a an ‘access’ method/service on the other package to get to the java classes etc that you want to.

    If you have come up with something else, let us know.

    thanks

    Simon


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


  • 3.  RE: Linking java services from another package

    Posted Tue April 13, 2004 01:56 PM

    You can use package dependencies to gain run-time access to classes in other packages. Setting package dependencies modifies the search path when attempting to load a class.

    There is a slight gotcha here…You’ll have to modify your development environment to include these dependencies. You can do this in several ways: modify the server’s compile property (used when saving modifications to a Java service) to include the classes & jars of the packages you depend on, modify jcode batch file to update the path dependencies, or alter your IDE build commands to accomodate this.

    cheers!

    Ed


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


  • 4.  RE: Linking java services from another package

    Posted Tue April 13, 2004 06:59 PM

    Cheers for the info - I’ll have a play.

    Simon


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


  • 5.  RE: Linking java services from another package

    Posted Thu April 15, 2004 04:27 PM

    Hi,

    I used package dependencies to try access to classes
    in other packages, but it didn’t work.
    I’ll try what you say…

    Thanx !!!

    Sebastián Miranda
    Barcelona, Spain


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