There is a well hidden script named sync-websphere-maximo.cmd under [SMPDIR]\applications\maximo directory that takes the classes in the businessobjects, maximouiweb, mboweb, meaweb and lib directories and roughly copies them to the WAS MAXIMO.ear folder.
First of all you have to configure the script editing sync-websphere-maximo.xml file and set maximo.websphere.dir property.

A fast technique that I use is to directly copy java class files in the MAXIMO.ear directory under WebSphere tree. In a typical deployment it is located under [WSDIR]\AppServer\profiles\ctgAppSrv01\installedApps\ctgCell01\MAXIMO.ear.
The little trick is to use a good file archiver tool like 7-Zip to dynamically add/replace files in the businessobjects.jar file without having to extract and rebuild it.
This is the exact sequence to follow.

Set "Reload classes when application files are updated" checkbox and set "Pooling interval for updated files" to 5 seconds.

Ensure "Debug Mode" is also enabled on MXServer application server.

Start Maximo application server and check if everything is ok.

After these changes you can modify java classes and if you would like to refresh classes on WebSphere server you only need to copy the file into the businessobjects.jar or maximouiweb.war folder. WebSphere will automatically recognize new classes and will reload them so you don’t need to restart Maximo application.
If you are using Eclipse to develop the changes you can create simple ant builder which will responsible for copying updated files to businessobjects.jar and maximouiweb.war folders.

19 comments:

You can also avoid to unzip/zip the businessobjects.jar:0) stop WAS1) move businessobjects.jar to a temp directory2) in Maximo.ear create the directory "businessobjects.jar" (same name of .jar)3) unzip all the files of businessobjects.jar in the new directory 4) start WAS

I do have occasionally used the exploded businessobjects.jar technique to replace .class files on the fly.

There is also an option when you are publishing the maximo.ear to check the classes for changes (it is in the first screen, where you put the application name, typically MAXIMO). When a change is detected, typically the application server is automatically restarted by WebSphere if my memory doesn't fail.

Now I use hot deployment with Eclipse when developing, it's faster and doesn't require a restart of the app. server unless the "interface" for the class changes (signature of a method, implemented interfaces, names, etc.).

HI Bruno, I am Facing a problem after i deploy the class file.I create two new fields in the workorder table and applied filed level customization on them .But once i o specify the class path to the corresponding attribute and the deploy the classes the two corresponding fields become readonly.Please help me through this

Hi Bruno,Together with my colleagues we found some WehSphere modification which help to improve developing phase. Please read our suggested solution (The difference between your and our solution is in point no.4 ):Super-fast approach (~1 minute)First environment configuration:1. Stop Maximo application server.2. Go in MAXIMO.ear folder and unzip the businessobjects.jar file into a directory named businessobjects.jar.3. Rename the businessobjects.jar file (e.g. businessobjects.orig.jar)4. Change WebSpher configuration:a. Log into the WebSphere web consoleb. GoTo “Enterprise Applications” -> MAXIMO -> “Class loading and update detection”c. Set “Reload classes when application files are updated” checkbox and set “Pooling interval for updated files” to, for example, 3 seconds(Note: Check if “Debug Mode” is also enabled on MXServer)5. Start Maximo application server and check if everything is ok.

After these changes you can modify java classes and if you would like to refresh classes on WebSphere server you only need to copy the file into the businessobjects.jar or maximouiweb.war folder. After that WebSphere will recognize that classes were changed and will reload application. In this scenario you don’t need to start/stop maximo application.If you are using Eclipse to develop the changes you can create simple ant builder which will responsible for copping updated files to businessobjects.jar or maximouiweb.war folder.

Soon as I replace the class file, I get a message in the logsWSVR0041I: Stopping EJB jar: mboejb.jar

after which application stops and starts back which takes about 2 minutes, and of course I also get logged out. I've tried replacing businessobjects.jar and same thing happens. Is that normal or am I missing a setting to reach the 'speed of light'?

by the way I'm working on a custom Cron Task file. Or does it not work on crontask files?

Hi,Absolutely great article. I have used the supre-fast approach for a long time and now I tried the speed-of-light... works fine.But one note/question. Speed-of-light approach logs me out if there are new or updated classes. Are there anything that can be done to prevent this?

Bartosz M,"After that WebSphere will recognize that classes were changed and will reload application. In this scenario you don’t need to start/stop maximo application."

Maximo automatically restarts after you load new classesIt is the same as if you load classes and manually restart the server (killing proccess). This process takes a couple of minutes, but not seconds as you pointed out in the article

Follow MaximoDev on

Follow by Email

Google+ Followers

Disclaimer

The postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
The materials on this site are provided "AS IS" and the author will not be liable for any direct, indirect or incidental damages arising out or relating to any use or distribution of them.