Menu

Integrating with Weblogic

Help
Qumar
2008-04-03
2013-05-13
  • Qumar

    Qumar - 2008-04-03

    Hi,

    I have Jensor installed on my Windows Machine and I have weblogic server[8.1SP4] running on Solaris machine.I have instrumented an application and than deployed on Weblogic Server.
    On jensor console I started a session by providing IP adress of machine[solaris] having weblogic server and my weblogic server port[7001] but nothing happend and after some time
    the command prompt where I started Jensor, I see OutOfMemory Error.

    I think, I am missing some this in configuration.
    Please let me know, how to integrate Jensor with Weblogic , when both are running on diffrent machine.

    Thanks,
    Qumar

     
    • Amol Khanapurkar

      Hi Qumar,

      Jensor on Solaris wont accept signal from the JAW (Jensor Analysis Workbench) on Windows until the Windows host is added to trusted list of Jensor on solaris. To add Windows host to trusted list of Solaris there are two options

      1) Launch Jensor UI on Solaris -> Login as Administrator -> Add Windows host to trusted list using Administration -> System Admin option.
      2) Manually edit $JENSOR_HOME/config/hosts.all file. Add Windows host on a new line.

      This will enable Jensor on Solaris to now listen to remote connection coming from Windows JAW. At this point, I must say, also verify weather output files are getting generated on Solaris in $JENSOR_HOME/output folder.

      Now when you send start session signal from JAW to solaris, specify solaris IP and Jensor port (21999 by default) and not Weblogic HTTP port. If you havent changes default Jensor properties then give port as 21999 only.

      As for OutOfMemoryError, edit the -Xms and -Xmx options in startup.bat on Windows to adjust to required Heap Size. JAW status bar depicts how much memory it is consuming.

      Hope this helps
      - Amol

       
    • Qumar

      Qumar - 2008-04-04

      Hi,

      You mean I have to install Jensor on the Solaris machine[having Weblogic] too?
      can you point me some docs, where I can find more information about integrating Jensor with Weblogic and both are running on diffrent boxes.

      Thanks,
      Qumar

       
    • Amol Khanapurkar

      Jensor works on the principle of Byte code instrumentation. To collect profiling data application code needs to be instrumented. Instrumentation and subsequent deployment concepts are well-documented.

      There is a folder called 'docs'inside your %JENSOR_HOME% directory. Check out the Usage Manual for concepts on remote JVM monitoring.

      - Amol

       
    • Amol Khanapurkar

      Hi,

      Jensor works on the principle of Byte code instrumentation. To collect profiling data application code needs to be instrumented. Instrumentation and subsequent deployment concepts are well-documented.

      There is a folder called 'docs'inside your %JENSOR_HOME% directory. Check out the Usage Manual for concepts on remote JVM monitoring.

      - Amol

       
    • Qumar

      Qumar - 2008-04-06

      Hi Amol,

      I have already checked all the docs inside %JENSOR_HOME% directory but I am unable to find any one that talk about integrating JENSOR with any APPLICATION SERVER.

      and There is also not much about monitoring remote JVM.

      I just want to know that Is it possible to monitor an application deployed on Weblogic[Runing on Solaris box] from JENSOR [Running on Windows box]?

      if yes, Please provide me steps.

      Till now, I have done following steps.

      1. Installed JENSOR on Windows box.
      2. Weblogic installed on Solaris box.
      3. Instrumented an application using JENSOR.
      4. Deployed the instrumented application on Weblogic.

      please tell me next steps and let me know, if i am missing something?

      Regards,
      Qumar

       
    • Suresh Malan

      Suresh Malan - 2008-04-07

      Hi Qumar,
        What needs to be done is install Jensor on both machines, i.e., Solaris and Windows boxes.
        Jensor within the instrumented application needs to write the logs into the directory $JENSOR_HOME/output. This will come into existence when Jensor is installed on the Solaris box. Also the environment variable JENSOR_HOME is to be set.
        All the other things are okay, except that on the solaris box you need to add the IP address of the windows box to the trusted list of Jensor on solaris. To add Windows host to trusted list of Solaris there are two options

      1) Launch Jensor UI on Solaris -> Login as Administrator -> Add Windows host to trusted list using Administration -> System Admin option.
      2) Manually edit $JENSOR_HOME/config/hosts.all file. Add Windows host on a new line.

        Try out these things and then revert back with the results.

      Regards,
      Suresh.

       
    • Qumar

      Qumar - 2008-04-07

      Hi Suresh,

      For the time being, I have dropped the idea of having Jensor on Windows box.
      Now I have both Weblogic and Jensor running on a Solaris box [single machine].
      I have checked the demo application and it is working fine. I can also monitor the Demo application using Jensor UI.[start session, stop session, jvm reply...etc]

      Now Followings are the steps that I used for monitoring an application using Jensor on Weblogic.

      1. Installed weblogic on Solaris.
      2. Installed[extracted] Jensor on Solaris.
      3. Created and ejb application[helloworldejb.jar].
      4. Instrumented the application using Jensor.
      5. set following jar files and the JENSOR_HOME in weblogic startup script.

      CLASSPATH= /home/wlsadm/jensor/Jensor/lib/jcommon1.0.5.jar:/home/wlsadm/jensor /Jensor/lib/jfreechart-1.0.2.jar:/home/wlsadm/jensor/Jensor/lib/jensorjdk14-v14-win32.jar:${CLASSPATH}

      and

      JENSOR_HOME=/home/wlsadm/jensor/Jensor
      export JENSOR_HOME

      6. Started Weblogic Server.
      7. Deployed the instrumented application[helloworldejb.jar] to weblogic.

      But when I try to start session from Jensor UI, it says "There is no Jensor Running".

      Please let me know, if I am missing something.

      Thanks,
      Qumar

       
    • Amol Khanapurkar

      Hi Qumar,

      You are doing fine. Now that the demo application has worked, your weblogic app. will also work fine if the deployment is correct. The instrumented app. only need jensorjdk14-v14-unix.jar in classpath. Usually putting it in WEB-INF/lib before starting the server adds the jar to the application classpath. Your way of doing it is also correct, except that jfreechart and jcommon jars are not needed to be in classpath.

      Also, Jensor gets activated on first invocation of a method from an instrumented class.  So did you execute anything from helloworldejb.jar. Once you exercise some code from this jar, watch weblogic stdout. You should see comments like "Profile started, Number of Processors " etc just like you see in the case of demo app.

      Once you see those lines, launch JAW (Jensor UI) and do collate records to analyse results. To resume data capture after 'Collate' issue a 'Start Session' command.

      Hope this helps you get setup with Jensor.

      Thanks for using Jensor.

      Regards,
      Amol

       
    • Qumar

      Qumar - 2008-04-09

      Hi Suresh/Amol,

      Thank you very much for your support.

      Finally I got it working on both my machine[Windows & Solaris].

      I have "Weblogic + Jensor" RUNNING on Solaris machine and "Jensor" RUNNING on Windows machine. Now I can monitor my app deployed on Weblogic from Solaris as well as Windows machine, using Jensor UI.
      Thanks again!!!

      But I still doubt about your comment that I have to install JENSOR on both machine.

      My Findings:

      I found that even though I shutdown[kill jensor_pid] jensor on Solaris machine, I can monitor my app from Windows machine.

      what I need to make sure is that  "jensorjdk14-v14-unix.jar" is in Weblogic classpath and JENSOR_HOME is also set in weblogic.

      I would welcome any comment over this.

      Best Regards,
      Qumar

       
    • Amol Khanapurkar

      Hi Qumar,

      Jensor on Solaris would actually need 3 things to run
      1) JENSOR_HOME
      2) jensorjdk14-v14-unix.jar
      and 3) Jensor directory structure.

      To get the directory structure created we recommend installing Jensor.

      As for Jensor still running even after killing the pid - that is because Jensor is now running in the context of your application. So Jensor lives as long as your application is running.

      You are welcome with any more questions you might have.

      Regards,
      Amol

       
    • rajani  pandala

      rajani pandala - 2009-04-28

      Hi,
      I need some suggestions regarding deployment.
      1. Installed eclipse on windows.
      2. Installed[extracted] Jensor on windows.
      3. I have selected class files from my source folder from eclipse.
      4. Instrumented the application using Jensor.
      now instrumented folder got created with instrumented classes in the projects/<projectname> instrumented folder.

      please let me know in what way i can proceed....and where i need to place this  jensorjdk14-v14-win32.jar

      I would welcome to give any suggestions over this....

       
    • Amol Khanapurkar

      Pls. post unrelated question in separate thread.

      Your steps seem fine. Now just use java -cp "%JENSOR_HOME%"\lib\jensorjdk14-v14-win32.jar yourpackage.yourclass and execute the program.

      Output will be populated in %JENSOR_HOME%\output folder.

      Suggest you go through installation verification section in installation guide before proceeding further.

      Also, Jensor 1.4 is more than an year old. The latest version is Jensor 1.9. Consider switching to latest version.

      -Amol

       

Log in to post a comment.