Consider this scenario (which I came across). You have extended psdi.app.workorder.WO out of the box MBO class with your own cust.app.workorder.WO class to implement you own business logic for work orders. After a while you install the Maximo Scheduler extension and you soon discover that all your custom logic has gone because the WORKORDER object handler in Database Configuration is now psdi.skd.app.workorder.SKDWOSet instead of your custom cust.app.workorder.WOSet class. This is because the Maximo Scheduler installation has overwritten your custom handler.
Lesson learned: If you have custom classes and extend the same classes which other products also are extending, then those classes will get overwritten when other products are installed and your customizations will be lost.
In order to maintain the customizations, you must define a_customer.xml file in the applications\maximo\properties\product folder. The following example shows a sample a_customer.xml file.
<?xml version="1.0" encoding="UTF-8" ?>
<name>My custom classes</name>
<mbo objectname='WORKORDER' extends='psdi.app.workorder.WO'>custom.app.workorder.WO</mbo>
<mboset objectname='WORKORDER' extends='psdi.app.workorder.WOSet'>custom.app.workorder.WOSet</mboset>
Also, you need to create a directory called “a_customer” inside your tools\maximo\en directory. This directory can be left empty.
This will tell the Maximo installer to merge your custom code with the add-ons code.
For more details refer to the following articles:
- Preventing lost customizations when add-on products are installed
- Avoiding message “a_customer.xml file does not exist” on install
5 thoughts on “Avoiding Java classes conflicts using a_customer.xml file”
What does it mean it will merge custom code?
It will update the object's mbo class with your custom class in the db, that was overwritten by the new product installation.
The same works for field classes.
As far as I know, the "merge" concept does not exist in Java. Am I wrong ?
What I do (since Maximo 5.0…) :
I edit my sources (import section and extend key word) :
Then I compile them
Then I rebuild EAR and redeploy
Then I check the ClassName in MaxObject, MaxObjectCfg, MaxAttribute, MaxAttributeCfg tables (and update them if something was going wrong).
Then I restart MXServer.
I would be VERY interested in the way to install SEVERAL industry solution (i.e Oil a Gas plus Transportation plus Nuclear). How to do in such case ? What to do in a_customer.xml? In what way should I edit the respective XML of Oil and Gas, Transportation ant Nuclear products ?
I want to remove a standard IBM class and have NO class instead.
Is this possible using an XML file?
If so, what is the format for specifying NO class?
Everything I have tried (including “”, “null”, “~null~”) results in a “Invalid class name” error.
You can try with psdi.mbo.custapp.CustomMboSet. It is an empty handler with no logic in it.