I used to have my own interceptor logging all required thing into the database, so never had to look at ESB console.
Issue 1 :
Recently when I was working on ESB console I realized that it displays only a day old instances! While looking into the database I saw all instances where there.
Yeah, of course the ESB client API was causing the issues. As mentioned in my earlier blogs, to debug ESB Console related issues, the best things is to use obtunnel to intercept all your request and then simple wingrep/grep to search for what you interested in.
The reason behind day old instance was easy to find:
File Name: %soasuite%/j2ee/oc4j_soa/applications/esb-dt/esb_console/esb/model/model.InstancesSearch.js
Where: Search for key word "InstanceSearchModel.prototype.init" about the line number: 150 in 10.1.3.1
Content:
Original:
InstanceSearchModel.prototype.init = function(serviceConfigROTID)
{
this._trackingSC = new TrackingSearchCriterion(serviceConfigROTID);
this._serviceEntityInfo = null; // ESBEntityInfo
this._status = "Any";
this._flowID = "";
this._timePeriod = 1;
this._timeUnit = "days";
this._timeZoneString = InstanceSearchModel.getTimezoneString(new Date(), false);
}
Basically InstanceSearchModel creates Rest Webservice request to ESB server, and timePeriod is configurable parameter to this object. Based on my observation, other javascript which are using InstanceSearchModel object are not passing this parameter, so default parameter will be used which is 1 day. I changed the default to 20 days and it showed 20 days worth of instances...
Modified:
InstanceSearchModel.prototype.init = function(serviceConfigROTID)
{
this._trackingSC = new TrackingSearchCriterion(serviceConfigROTID);
this._serviceEntityInfo = null; // ESBEntityInfo
this._status = "Any";
this._flowID = "";
this._timePeriod = 20;
this._timeUnit = "days";
this._timeZoneString = InstanceSearchModel.getTimezoneString(new Date(), false);
}
Issue 2 :
ESB has limitation on returning only 100 results. It was an amanzing experience to rip off the entire oraesb.jar and go through the hierachy of java files,
soasuite/j2ee/oc4j_soa/applications/esb-dt/esb_console/WEB-INF/web.xml
oraesb/oracle/tip/esb/configuration/servlet/CommandServlet.jad
oraesb/oracle/tip/esb/configuration/servlet/command/GetInstancesCommand.jad (xmlInstanceManager.getInstances)
oraesb/oracle/tip/esb/console/XMLInstanceManager.jad
oraesb/oracle/tip/esb/console/XMLInstanceManagerImpl.jad
oracle/tip/esb/monitor/manager/ActivityMessageStore.jad
oraesb/oracle/tip/esb/monitor/manager/database/DBActivityMessageStore.jad (InstanceListXMLBuilder)
oraesb/oracle/tip/esb/monitor/manager/database/InstanceListXMLBuilder.jad
oraesb/oracle/tip/esb/monitor/manager/database/FilterParser.jad (String s = RepositoryFactory.getRepository("RUNTIME").getESBParameter("MaxInstanceCount"))
Bingo! Finally I found the last file which was reading the parameter from ESB parameter table, now it was piece of cake!
I added, insert into esb_parameter (PARAM_NAME, PARAM_VALUE) values ( 'MaxInstanceCount', '1000' ); in ORAESB schema, and bounced the server and it started working like magic!
6 comments:
Chintan,
Nice Trick for getting more than 100 instances displayed on the ESB console.
For getting instances older than one day, you can specify Activity in last parmater on the Search page. This filed is hidden under Basic/Advance. If you click + sign it displays the Advance search options and that is where this field is hidden.
Thanking you
Dinesh Patel@National Instruments.
Thanks Dinesh. Didn't realize number of days where configurable. Cool, so issue no 1 is not issue any more.
Chitan,
Its really cool to see more than 100 instances on ESB Console. I have never thought of it. Thanx man.
Keep rocking.
Cheers,
Abhi...
Hi Chintan,
I have a different issue. I am not able to see any ESB instances on my ESB console. A search says no instances found. Any idea what could be wrong.
Thanks in advance..
chintan, great idea for viewing more than 100 instances.
But I have a similar problem to that of above "R". I am not able to view any of the ESB instances. What could have gone wrong!!
Anyone any ideas.
P.S: Using clustered HA environment
Any error in design time? did you try to clear out the internal queues?
Post a Comment