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

Eclipse and WM IS46

  • 1.  Eclipse and WM IS46

    Posted Tue October 07, 2003 04:15 PM

    Has anyone successfully configured Eclipse as an external IDE for WM 4.6 and been able to run java services through the Eclipse Debugger?

    –steve


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


  • 2.  RE: Eclipse and WM IS46

    Posted Tue October 07, 2003 04:57 PM

    Yes. That is my normal development mode for Java services.

    You just need to make sure you change the command-line options when launching the IS to enable the debugger.

    Make sure you update your project settings to include the package’s code/classes directory where your Java service is located.

    Are there any specific problems that you are having?


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


  • 3.  RE: Eclipse and WM IS46

    Posted Tue October 07, 2003 05:20 PM

    well, I am still learning Eclipse and have only used it for JSP/servlet development with the Tomcat and the Eclipse Tomcat plug-in. So I am figure out how to create my Eclipse project and what folders I need and which jar I will need in my project build path, so my java files will compile. Also how did you incorporate Jcode into Eclipse?


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


  • 4.  RE: Eclipse and WM IS46

    Posted Tue October 07, 2003 08:53 PM

    You can add jcode as an external build tool to your project for the package. That way when ever you build your project, it’ll automatically include the jcode command.

    One other alternative is to use an ant build file, which already has integration into Eclipse. You can use this to compile your Java services and perform the jcode tasks.


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


  • 5.  RE: Eclipse and WM IS46

    Posted Tue October 07, 2003 09:54 PM

    Here is what I have. I have created an Eclipse Project(default location is under my Eclipse Workspace directory)). I then created a source/om/db directory and classes/om/db directory. I have my source file “jdbc.java” in source/om/db.

    I have created an external build tool using jcode, which only works if I run Eclipse on the same machine as the IS4.6 server.

    My question is how is the newly complied class file and the source file getting updated in the packages/<mypackagename>/code/source and packages/<mypackagename>/code/classes?

    I have IS running in debug, I have modified my watt.server.compile to compile in debug. How do I execute the server so Eclipse will catch the break point?

    perhaps, we could take this offline to discuss in details the configuration of Eclipse?


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


  • 6.  RE: Eclipse and WM IS46

    Posted Tue October 07, 2003 11:52 PM

    ok, with some help from Eduardo, here are the steps to configure Eclipse and webMethods 4.6

    1. Modify server.bat, modify the following line “set JAVA_RUN=%JAVA_EXE% %JAVA_MEMSET%” to “set JAVA_RUN=%JAVA_EXE% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=8125,suspend=n %JAVA_MEMSET%”
      Note the adderss is the debug port, make sure you don’t have any conflict on this port, this not the admin port, so don’t use 5555 if you are still using the default admin port.

    2. Modify watt.server.compile to watt.server.compile=javac -g -classpath {0} -d {1} {2} This added debug to you classes

    3.Create an Eclipse Project, create an empty java project

    4.Create a new folder, select advanced and link to the WM package where you will be doing java service development.

    5.Select project properties | Java Build Path | source tab
    add folder, select advanced, and link to the “WM package | code | source” folder that contains your java source. Then expand the new folder in the source tab window and select output folder and edit the output folder. Select the “wm package | code | classes” folder.

    1. Select the Libraries tab. Then add External JARS. Select all jar files in <is> | lib and any other jar files you need from <is> | lib | jars.

    2. Select run | “debug …” Select Remote java application, create new. Set a name, the project is you Eclipse project, Connection type is Standard (Socket Attach), host is the host of the IS servers machine, port is the port number specified in step 1 “address”

    3. Now when you compile source you are compiling the Java code from code / source and generating class files in code/classes. There is no need to use jcode. Just run the service from the developer and Eclipse will catch the break point.


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


  • 7.  RE: Eclipse and WM IS46

    Posted Wed October 08, 2003 02:02 AM

    Steven,

    Thanks for taking the time to document these steps. I hear that WM is working on integrating Developer and Eclipse to increase the productivity of developers who need to create EJB’s to be used by the WmJBoss package. Not sure when or if this will be available as a FCS or preview version.

    The Developer editor so excruciatingly basic that it does a very good job of discouraging new users from putting too much integration logic into java services. However, there are times when you need to build more robust java services and having Eclipse pre-configured to work with Developer would be a great value-add.

    Regards,

    Mark


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


  • 8.  RE: Eclipse and WM IS46

    Posted Wed October 08, 2003 02:41 AM

    Mark,

    Thanks for the feedback, but you really need to thank Eduardo, with out his assistance, I would not have been able to document the configuration


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


  • 9.  RE: Eclipse and WM IS46

    Posted Thu October 16, 2003 01:35 AM

    Steve / Eduardo:

    What version of Eclipse were you working with? I’m having a little trouble matching your instructions to Eclipse 3.0.

    Thx,

    Mark


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


  • 10.  RE: Eclipse and WM IS46

    Posted Thu October 16, 2003 03:42 PM

    Mark,
    I am using WM 4.6 and Eclipse 2.1.1. What problems are you experiencing?


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


  • 11.  RE: Eclipse and WM IS46

    Posted Thu October 16, 2003 07:30 PM

    Well, the step-by-step instructions didn’t map to what I was seing in Eclipse 3.0 M4. I think was able to perform the equivalent steps in 3.0 until I got to step 7 “run | debug”.

    I’m also getting an “Editor could not be initialized” error message when I try to open the source file in Eclipse. The java editor works fine with other standalone java source files. It can open the source using the text editor, but that defeats the purpose.

    I’m going to switch back to Eclipse 2.1.x and give that a try.

    Eduardo, have you guys had success using a Eclipse 3.0 version as the Java IDE for Developer?

    -M


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


  • 12.  RE: Eclipse and WM IS46

    Posted Tue October 21, 2003 05:31 PM

    Mark,

    I did a quick test on Eclipse 3.0M2, steps are pretty much the same as described by Steve. I don’t get the initialization error when opening a Java source file either.

    What aspects of the Run | Debug steps are different from what is described?

    -ed


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


  • 13.  RE: Eclipse and WM IS46

    Posted Tue October 21, 2003 09:08 PM

    Mark,

    I tested w/ 3.0M4 just a few minutes ago. It looks like some changes were made that affected the link capability for folders in a project.

    Instead of creating a project and linking to the package’s directory, try creating your project outside of the workspace. Opening the Java source file should work properly (i.e. using the Java editor).

    hth

    -ed


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


  • 14.  RE: Eclipse and WM IS46

    Posted Tue October 21, 2003 09:49 PM

    I was able to use the Eclipse 2.1.1 debugger for IS java service development by following the steps that Steve summarized above. I’ll try to get Eclipse 3.0M4 to work sometime soon.

    Are you thinking that some M4 changes are responsible for the editor initialization issues I’m seeing or were the M4 changes related to an issue with linking to folders in an IS server’s packages directory?

    On a slightly different topic, what do you see as being a reasonably productive way to use Eclipse to do java development using a shared server?

    Mark


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


  • 15.  RE: Eclipse and WM IS46

    Posted Wed November 19, 2003 10:19 PM

    VERY GOOD THREAD!

    My eclipse gave me “Failed to connect to remote VM” error following the above steps.
    I overcome the problem by changing JAVA_RUN as shown below:

    set JAVA_RUN=%JAVA_EXE% -Xrs -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n %JAVA_MEMSET%


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


  • 16.  RE: Eclipse and WM IS46

    Posted Thu November 20, 2003 01:06 AM

    Ravi,

    Running “java -X” at the command line says that the -Xrs option is intended to “reduce use of OS signals by Java/VM”. Do you know why this fixes the issue? Also, how did you identify the fix?

    Mark


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


  • 17.  RE: Eclipse and WM IS46

    Posted Thu November 20, 2003 01:36 AM

    Great posts! Thanks to all contributors!

    Wayne


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


  • 18.  RE: Eclipse and WM IS46

    Posted Thu November 20, 2003 03:19 PM

    Mark,

    The -Xrs flag prevents the JVM from receiving logoff events, which is important when running as a Windows service. Details here:

    [url=“JDK 19 Documentation - Home”]JDK 19 Documentation - Home


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


  • 19.  RE: Eclipse and WM IS46

    Posted Wed December 10, 2003 07:29 AM

    Very helpful thread, because wM Support cannot tell me how to do it.

    I’m running IS6.0.1 with SP2 and JVM 1.4.1. There is no problem to connect remotely to the IS, but when I debug my code, I cannot see any local variables. What do I wrong?


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


  • 20.  RE: Eclipse and WM IS46

    Posted Wed December 10, 2003 08:46 AM

    My former post is outdated. There was no debugging information in the class file. Now it really works fine. Thanks!


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


  • 21.  RE: Eclipse and WM IS46

    Posted Tue March 02, 2004 04:14 PM

    Given the popularity of this thread over the months, I thought the group might find today’s announcement about Eclipse support interesting.

    “webMethods Announces Commitment to Eclipse”
    [url=“Yahoo Finance - Stock Market Live, Quotes, Business & Finance News”]Yahoo Finance - Stock Market Live, Quotes, Business & Finance News

    webMethods was also listed as one of the add-in providers in the press release dated Feb. 2, 2004 from Eclipse concerning their transformation into a not-for-profit organization with a full-time management team.

    [url=“Eclipse.org consortium”]http://www.eclipse.org/org/press-release/feb2004foundationpr.html[/url]

    Mark


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


  • 22.  RE: Eclipse and WM IS46

    Posted Tue April 24, 2007 03:15 AM

    I found very usefull and simlpe to just use debuging harness when dealing with complex java services in WM development. In most cases within customer networks and shared servers I cannot simply change IS settings and restart server at will and have to cooperate with environmnet restrictions.
    Here is simple harness Java class I use to debug any Java service using saved input pipeline file:

    public class Tester {
    public Tester{
    super();
    }

    public static main(String args)
    {
    Tester t = new Tester();
    t.debug_wm_svc(“c:\wm\pipeline\test”);
    }

    public void debug_wm_svc(String pipe)
    {
    IDataXMLCoder wm_coder = new IDataXMLCoder();
    try
    {
    IData dt = wm.coder.decode(new FileInputStream(pipe));
    MyService(dt);
    }
    catch(Exception e) {e.pritntStackTrace();}
    }

    public static final void MyService(IData pipeline)
    {
    //////////////////////////////////////////////////
    // Copy your Java service code here and
    // debug as usual Eclipse Java project

    }
    }


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