on 10-13-2006 7:10 AM
Hello Everyone,
Is there a way to specify application reference programmatically in a J2EE application at runtime (e.g. "com.sap.km.application"), instead of declaring it in the application-j2ee-engine.xml at deploy time?
Thanks,
Martin
Hi Martin,
No, there is no such API. And it does not make sense to have one. Application references are taken into account at deploy/start time (e.g. to determine deploy/start order, etc.), so even if it were possible to specify references at runtime, they would not have any effect.
Best regards,
Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vladimir,
Thanks for the reply.
I think part of the problem is limited understanding on my part.
What role does the application reference play besides influencing the classloader? If I were able to influence the classloader to find the relevant classes, would this be sufficient? How would I go about doing that?
Thanks,
Martin
Hi Martin,
Besides the classloading, that reference information is used to determine the startup order among applications.
So if your application will try to use resources and functionality from KM without reference, then it might try to start BEFORE KM and end in exceptions since they won't be available.
Please check
for a real world example.
HTH
Peter
Hi Peter,
Thank you for the reply. I understand your point about J2EE using this information to determine startup order, as the reference also defines dependencies, which makes perfect sense.
Do you know, however, whether there is a way (maybe via an API) to specify an application reference at runtime (instead of at deploy time) to be able to influence the classloader to pick up classes from another application, for example KM? That is what I am trying to do.
Regards,
Martin
Hi Martin,
I should have added that application classloaders are initialized at deploy/start time and there is no way to modify them once being created. So, even if you change the app references at runtime, you'll need to restart that app.
Anyway, if you are still interested in going this direction, you might want to have a look at the CHANGE_REF telnet command in the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/ae/01343ef3f9ff2de10000000a114084/frameset.htm">DEPLOY</a> group.
Best regards,
Vladimir
PS: Peter, thanks for the kind words
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.