Pages

Monday, July 16, 2012

Fast Swap In Weblogic

Share it Please

In the common development environment, the developer needs to test his application many times and he needs to test the application very fast. But there is a long process for viewing the changes that are made to code, we need to Edit -> Build -> Deploy - > Test. This process was heavy even though most of the tasks are automated by the j2ee.

How this work does: Jdk 5 allows redefining a class [Chaning method names, adding methods, adding fields] without dropping its class loader. That is when we make some changes to the class , the class loader that already loaded the current class takes the changes without the application being redeployed or deleting the already loaded and existing instances. With Fast Swap, Java classes are redefined in-place without reloading the Class Loader, thereby having the decided advantage of fast turnaround times. This means that you do not have to wait for an application to redeploy and then navigate back to wherever you were in the Web page flow. Instead, you can make your changes, auto compile, and then see the effects immediately.

This feature works only in development mode. This is disabled automatically in production mode.

NOTE: modifications done to the files that are in exploded archive are only accessible for fast swap. Files that are changed and kept in jar or any other archive format are not supported.

Fast swap can be enabled for web application by plaing

<fast-Swap>true</fast-swap>  , In Weblogic.xml file in web-inf.

Whereas the same element is added to Weblogic-application.xml for enterprise applications.

Happy Learning J