Build 5.2 GA (and 5.4.0.356?)
Unverified issue reported by customer; description and attached files from customer. Customer was able to execute correctly when not using XA-Tracer.
I wrote what is basically a singleton (JetsDistributorList), though it is manually initialized with a call to its initJetsDistributionList(...) static method. The purpose of the initJetsDistributionList method is to load up various files so the other two methods can be called to query the loaded tables and return their computed lists of the input data.
The following is a small excerpt of the XAware script where the first JavaBizComponent , InitializeJetsList.xbc, is called to perform the initialization in the <InitDistributorData> element. Then the next JavaBizComponent, GetDistinctDTCCNo.xbc, is called to get the first array in the DistributorMapper/DistinctDTCC/RVS element. This invocation of JetsDistributorsList.getDistinctDTCC(...) works, so the second call to the JetsDistributorsList object is still valid and using the static variables created by the initJetsDistributionList method. However when I call the same GetDistinctDTCCNo.xbc in the DistributorMapper/DistinctDTCC/RVSNY element, the JetsDistributorList object has been reinitialized with the instance variable set back to null. My guess is the class loader got switched or something else more drastic happened that required the JetsDistributorList object to be reloaded, because the variables I'm checking are all static and the methods being called are all static. Only the reloading of the object would set the variables to null.
<DistributorMapper xmlns:xa="http://xaware.org/xas/ns1" xa:version="5.1" xa:on_error="xa-doc::/DistributorMapper/Error">
<xa:input>.....
</xa:input>
<CurrentDate>$xaware:Format a date(yyyyMMdd,%currentDate%,MMddyyyy)$</CurrentDate>
<propFilePath>%propFilePath%</propFilePath>
<Codes>
<RVS>...</RVS>
<RVSNY>...</RVSNY>
</Codes>
<InitDistributorData xa:bizcomp="com/ameriprise/itasca/FAR/InitializeJetsList.xbc" xa:remove="yes" jetsFilePath="%jetsFilePath%" TTPRTFilePath="%TTPRTFilePath%" distributorMappingFilePath="%distributorMappingFilePath%" />
<DistinctDTCC>
<RVS xa:bizcomp="com/ameriprise/itasca/FAR/GetDistinctDTCCNo.xbc" xa:remove="no" type="%xa-doc::/DistributorMapper/Codes/RVS%" />
<SaveDistinctRVSDTCC>
.........
</SaveDistinctRVSDTCC>
<RVSNY xa:bizcomp="com/ameriprise/itasca/FAR/GetDistinctDTCCNo.xbc" xa:remove="no" type="%xa-doc::/DistributorMapper/Codes/RVSNY%" />
<SaveDistinctRVSNYDTCC>
..........
</SaveDistinctRVSNYDTCC>
</DistinctDTCC>
I can make the process work by always initializing if required, but that defeats the objective of loading up the files one time. The jar containing this and its supporting classes is stored in the <xaware.home>/dynamic/jars folder. Would it help to place these classes in another location? Can you suggest another approach to allow the object to stay resident in the classloader so it doesn't have to be reintialized?
The behavior described above occurs in the XAware Tracer.