java

MBO Performance Tip N.6 – Free resources as soon as possible

This entry is part of the Java MBO performance optimization golden rules series. It is important to know the difference between close(), cleanup(), and clear() methods and use them to free up resources as soon as possible. close(): Close the cursor, release the database resources (result set),  SQL statement, and connection key. Does not release […]

MBO Performance Tip N.5 – Avoid using setQbe method, use setWhere instead

This entry is part of the Java MBO performance optimization golden rules series. The MboSet.setQbe() method is designed to be used to build filters from the user interface. Using the MboSet.setQbe() method will automatically add jolly characters in text searches preventing the database server to be able to use indexes.For example let’s look at the […]

MBO Performance Tip N.4 – Be careful when calling MboSet.save()

This entry is part of the Java MBO performance optimization golden rules series. This tip regards the correct handling of transactions in TPAE. The important concept to understand is that MBOs obtained via relationship are included in the same transaction as the parent MBO set. When any MboSet in the transaction is saved, all MboSets […]

MBO Performance Tip N.3 – Be light in Mbo initialization methods

This entry is part of the Java MBO performance optimization golden rules series. The initValue() method is the first method executed after the MBO constructor. It is typically used to initialize attributes on new records and to set default values.The init() method is called after initValue(). It is typically used to set current attribute as […]

MBO Performance Tip N.2 – Use discardable MBOs when possible

This entry is part of the Java MBO performance optimization golden rules series. If an MboSet is used for traversing forward only and not to be saved make it discardable by setting the DISCARDABLE flag.The following snippet shows how to do it. MboSetRemote mboSet = getMboSet(“ASSET”);mboSet.setFlag(MboConstants.DISCARDABLE, true);MboRemote mbo=null;for(int i=0; (mbo=mboSet.getMbo(i))!=null; i++){ …} Using a discardable […]

MBO Performance Tip N.1 – Avoid using MboSet.count() method in loops

This entry is part of the Java MBO performance optimization golden rules series. I think this is one of the most common errors when developing Java MBO code.The MboSet.count() method issues a “SELECT COUNT(*) from …” SQL query to retrieve the number of records in the database table.This can be a big problem especially when […]

Java MBO performance optimization golden rules

This entry is part of the Maximo Java Development series. In this post I have collected the most important Maximo Business Objects (MBO) development performance tips and suggestions that I have learned during my job as a Maximo Consultant.These suggestions are partly distilled from the IBM Maximo wiki page trying to organize and simplify the […]

Rapid Java class deployment on WebSphere

This entry is part of the Maximo Java Development series. In this post I will describe how to minimize the time needed to redeploy the custom Java code in Maximo running on WebSphere during the development phase. Note: The techniques explained in this article (except the first one) are recommended only for development environments. Here […]

Detect if an MBO method has been invoked by an user session or by a background process

You are in the middle of a Mbo class and you have to perform some logic only if your piece of code is invoked by a user sitting in front of of Maximo UI.How would you understand if the Mbo method has been invoked by an interactive user session or by a background process like […]

Scroll to top