on 01-04-2006 9:00 AM
Hello,
I have written a Java Mapping which needs to access lookup data stored in an external database.
I would like to cache the lookup data.
To get this running, I have declared static String tables and carried out the DB access in a static initialization block.
Once I test the mapping in integration builder design, I can see in the trace that my mapping class is reloaded( and the static initialization redone ) each time I run the test.
I am now struggling on whether the classloading for each test is a feature of the test framework?
Another point is, that I would like to do the database access and the caching of my lookup objects at system start and not on the first processing of a message mapping (very easy to be done in SAP Business Connector). Is there a way to do this in XI?
Thanks
Matthias
Hi Matthias,
> I am now struggling on whether the classloading for
> each test is a feature of the test framework?
Very empiric, but I would try to send a message twice at runtime, log your static init somewhere (Trace Object) and check it out.
> Another point is, that I would like to do the
> database access and the caching of my lookup objects
> at system start and not on the first processing of a
> message mapping (very easy to be done in SAP Business
> Connector). Is there a way to do this in XI?
No easy way without touching the <i>delicate</i> J2EE machine.
And, yes, I agree: BC is still great for certain aspects!
Alex
Message was edited by: Alessandro Guarneri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!!!
In XI 2.0 your java mapping class is reloaded for every message processing.
Fortunately, in XI 3.0 this behaviour was changed. Now a class is not reloaded when a message arrives, so it's possible to create your own cache - I tested it and it works.
Regards,
Andrzej
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Alex,
than my idea would be to create a little statless session ejb which performs all the DB access, caching, refresh etc.
This ejb would than be called from my java mapping for lookup requests?
Regards
Matthias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.