cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

rolf_paulsen
Active Participant
0 Kudos

Hi,

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.

HTH

Regards

rolf_paulsen
Active Participant
0 Kudos

hi Md Wasim Anwar,

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

Regards

Rolf

Former Member
0 Kudos

Hi Rolf,

Thanks for you response.

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