mbo

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 […]

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 […]

Integrating Maximo with Java application through RMI

This entry is part of the Maximo Java Development series. In this article I will describe how to call Maximo business objects methods remotely using a Java RMI connection. This technique can be useful to integrate Maximo in custom applications written in Java or to perform a particular processing of data stored in Maximo database […]

Retrieve multiple attribute values from an Mbo

This entry is part of the Maximo Java Development series. Maximo MBOs are not exactly lightweight, however there are some little tricks to improve performances and reduce system resources consumption. One of the most common mistakes that I have seen is the redundant use of getters methods of the psdi.mbo.Mbo class.In the following example three calls to getString/getInt […]

Extending Maximo Business Objects

This entry is part of the Maximo Java Development series. Sometimes it is necessary to override or extend the functionality in Maximo. This can be achieved by extending methods in the Maximo Business Objects.This article outlines the process involved in extending the out-of-the-box psdi.app.item.Item class to initialize the description field to a specific value. Create […]

Scroll to top