Monday, July 13, 2009

Useful Shortcut for eclipse IDE

Following are useful shortcuts that a developer can leverage on eclipse IDE.

Ctrl + Shift + O : Organize imports
  • Ctrl + Shift + R : Search resources
  • Ctrl + T : Type hierarchy
  • Ctrl + / : Line Comment
  • Ctrl + Shift + T : Open Type
  • Ctrl + O : Open declarations
  • Ctrl + E : Open Editor
  • Ctrl + Shift + F4 : Close all Opened Editors
  • Alt + Shift + R : Rename
  • Alt + Shift + L : Extract to Local Variable
  • Alt + Shift + M : Extract to Method
  • F3 : Open Declaration
  • Alt + Shift + X : Run As…
  • Alt + Shift + D : Debug As…
  • Alt + Shift + W : show the class in the package view.
  • Ctrl+Q : Last edit
  • Alt + Left or Alt + Right : Navigate Left and Right
  • Ctrl + 1 : Quick Fix
  • Ctrl + Space : Content Assist
  • Ctrl + Shift + F : Format code
  • Alt + Shift + S + R : Generate getter and setter methods
  • Monday, June 22, 2009

    Thursday, April 9, 2009

    JBI and Apache Service Mix

    Excellent Video at

    http://parleys.com/display/PARLEYS/Home#slide=1;title=ServiceMix;talk=14123079

    WAS 6.1 issue with log4J

    Apache Commons Logging has a problem with WAS 6.1. Its Log4JLogger either can't be loaded or be reported not compatible with LogFactory.The root cause is WebSphere uses commons-logging and so it's in the root classloader. In addition, WebSphere ships a commons-logging.properties with the following properties set:

    org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImplorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger

    Therefore by default the application will use JDK logging and not log4j.

    The solution is to ensure that the right classloader mode is set and the application has an appropriate commons-logging.properties:

    1. Set application classloader mode as PARENT_LAST.
    2. Also, add a commons-logging.properties to the application classpath with the following entries:

    priority=1
    org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl

    The priority flag was introduced in Commons Logging 1.1 to allow an ordering based on priority.

    To ensure that an application's commons-logging.properties will take precedence over WebSphere's file, a priority of greater that 0.0 must be set.