Skip to content

Blog



Share this:

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 objects. You can still work with MBOs already retrieved from the MboSet. Close the set as soon as possible if reusing the set is not needed in following logic. cleanup(): Reset the MboSet, and clear its current transaction. Clears any filters. clear(): Removes all the objects from the collection as well as all related objects.

Read more →

September 1, 2012

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 following code snippet. MboSetRemote assetMboSet = session.getMboSet("ASSET");assetMboSet.setQbe("ASSETNUM", "1000"); This tells the TPAE server to execute an SQL query like this:

Read more →

August 31, 2012

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 in that same transaction will be saved. Any redundant call to MboSet.save() method will affect performance and break the transaction chain. Theoretically the MboSet.save() must be called once after all the needed changes have been made to optimize performances and to correclty handle database transactions.

Read more →

August 30, 2012

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 read-only based on some condition. Do not query the database or do any other expensive logic in the initValue() and init() methods. Setting MBO or field flags that require expensive operation or fetching other needed MBOs should be done in initFieldFlagsOnMbo().

Read more →

August 29, 2012

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 MboSet does not cache the MBOs as it fetches from the database thus minimizing JVM memory usage. Note that discardable mbos are always read-only.

Read more →

August 28, 2012

Interacting with an Object Structure Service through HTTP

This entry is part of the Maximo Integration Framework series. In this tutorial I will show how easy it is to query and update data in Maximo using the Integration Framework (MIF) Object Structure Services using a simple HTTP client. HTTP test client setup A great tool for creating sample test HTTP requests is a great Google Chrome add-on called Postman REST Client. I strongly suggest to add it to your Chrome browser. If you are a Firefox user then you may try HTTPRequester.

Read more →

August 27, 2012

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 used in loop statements like this: MboSetRemote mboSet = getMboSet("ASSET");for (int i=0; i < mboSet.count(); i++){ MboRemote mbo = mboSet.getMbo(i); ...} The previous code snippet will issue a new SQL count statement for every iteration of the loop. A better approach is the following.

Read more →

August 25, 2012

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 information contained in it. I have also added few new tips based on my professional experience.

Read more →

August 24, 2012

Maximo supported web browsers

What web browsers can be used to access Maximo? Roughly speaking, Maximo supports only Microsoft Internet Explorer and Mozilla Firefox. Said that… I currently use Google Chrome with Maximo. Pages load faster and it works perfectly 99% of the times (except for reports). The following table gives a quick overview of the current supported web browser versions. Base Services version 6.2 6.2.5 7.1 7.1.1.4 7.1.1.6 7.5 7.5.0.3 Internet Explorer 6 Internet Explorer 7 Internet Explorer 8 Internet Explorer 9 Mozilla Firefox 3.0 Mozilla Firefox 3.5 Mozilla Firefox 3.6 Mozilla Firefox 4 Mozilla Firefox 10 Google Chrome Reference: Product Configuration Matrix

Read more →

August 22, 2012

Maximo Integration Framework first setup

This entry is part of the Maximo Integration Framework series. If you have never used the Maximo Integration Framework you have to check the MIF configuration before being able to play with it. System Properties All the configuration parameters for MIF can be managed from the System Properties application: GoTo -> System Configuration -> Platform Configuration -> System Properties. -> mxe.int.* The most important property to check is mxe.int.globaldir. This property specifies the root folder where all the integration configuration files are located. If this value is null, the folders are created under the directory from which the application server is started, or from the current working directory of the application server (e.g. C:\IBM\WebSphere\AppServer\profiles\AppSrv01).

Read more →

August 20, 2012