Skip to Content

Problem with getting java system properties from java class for different development components

Oct 13, 2017 at 07:09 AM


avatar image

Hi All,

Let me explain my scenario:

I have following DCs(Development components) in different SCs(Software Component)

dc1 in SC: sc1 and dc2 in sc2.

I have configured sap configuration in both the DCs and have following java files

java1 in dc1 and java2 in dc2.

I am invoking java2 method m1 from java1.

m1 method of java2 is fetching the java system properties configured in dc2.

But when i m running the code , m1 instead of getting properties configured in dc2 , it it trying to fetch it from dc1, hence not able to pick the property.

Need help in fetching the java property from dc2.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Rolf Paulsen Oct 19, 2017 at 07:37 PM

hi Md Wasim Anwar,

sorry I don't understand what you mean with sap configuration and java system properties, could you please explain. in ear?



Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Rolf,

Thanks for you response.

By Sap configuration i mean in ear whose values can be modified from server via Java System properties in nwa.

Rolf Paulsen Nov 14, 2017 at 08:41 PM


I have been busy the last days but did not forget your question.

Are Java1 and Java2 Session Beans bundled in different ears ear1 and ear2?

Is there a runtime dependency from ear1 to ear2?

And is Java2 injected via @EJB into Java1?

This should work.

If you call Java2.m1 directly without dependency injection, it will not work because the call remains inside ear1 and new InitialContext() in Java2 will return the Context from ear1 what you do not want.



10 |10000 characters needed characters left characters exceeded