Sei sulla pagina 1di 3

Investigations on the service dependency of the MboSet

definition in the Database Configuration


Author : Mohamed Lamine Hakouna
Date : 27/11/2015

Service Name Attribute


All calls to the getServiceName() method in Maximo source code:
public MXLogger getSqlLogger()
{
if (this.thisMboSqlLogger == null)
{
synchronized (this.syncLock)
{
if (this.thisMboSqlLogger == null)
{
StringBuffer buf = new StringBuffer();
buf.append("maximo.sql");
buf.append(".");
buf.append(getServiceName());
buf.append(".");
buf.append(getName());
String loggerName = buf.toString();
this.thisMboSqlLogger = MXLoggerFactory.getLogger(loggerName);
}
}
}
public MXLogger getMboLogger()
{
if (this.thisMboLogger == null)
{
synchronized (this.syncLock)
{
if (this.thisMboLogger == null)
{
StringBuffer buf = new StringBuffer();
buf.append("maximo.service");
buf.append(".");
buf.append(getServiceName());
buf.append(".");
buf.append(getName());
String loggerName = buf.toString();
this.thisMboLogger = MXLoggerFactory.getLogger(loggerName);
}
}

}
return this.thisMboLogger;
}
public MXLogger getWFLogger(Mbo mbo)
throws MXException, RemoteException
{
MXLogger newWFLogger = null;
StringBuffer buf = new StringBuffer();
buf.append("maximo.workflow");
buf.append(".");
buf.append(mbo.getThisMboSet().getMboSetInfo().getServiceName());
buf.append(".");
buf.append(mbo.getName());
String loggerName = buf.toString();
newWFLogger = MXLoggerFactory.getLogger(loggerName);
return newWFLogger;
}
public MXLogger getSecurityLogger()
{
if (this.thisMboSecurityLogger == null)
{
synchronized (this.syncLock)
{
if (this.thisMboSecurityLogger == null)
{
StringBuffer buf = new StringBuffer();
buf.append("maximo.security");
buf.append(".");
buf.append(getServiceName());
buf.append(".");
buf.append(getName());
String loggerName = buf.toString();
this.thisMboSecurityLogger = MXLoggerFactory.getLogger(loggerName);
}
}
}
return this.thisMboSecurityLogger;
}
Neither Maximo startup nor MboSet setup requires the getServiceName
It serves only to return the logger
This is an example of how its used
if (inst.getSqlLogger().isErrorEnabled())
{
inst.getSqlLogger().error(e);
}

MaxObject attributes
http://www.redbooks.ibm.com/redbooks/pdfs/sg247763.pdf
page 33
Main Object?: To make the object a main object for Workflow, select this check box.
Persistent?: If the object is persistent, three attributes are created: ID, description, and rowstamp (if selected).
If the object is non-persistent, nothing is added for attributes, but you cannot configure the database without
creating at least one attribute for the object.

Potrebbero piacerti anche