cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi all

I am making an application using CAF. My application has some properties which are used to control the application.

I can store these properties and their values in XML file and can use it in my application. Is there any other way to handle this in CAF?

0 Likes
View Entire Topic
Former Member
0 Likes

Hi Saurabh,

J2EE application service has generic support for application properties handling. Please read the <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2ce854ed-0701-0010-deb5-ffd61d73fd9f">Application Configuration</a> chapter (page 7). This short overview of this feature.

use the following coding in order to retrieve properties:

			
Context ctx = new InitialContext();
			ApplicationConfigHandlerFactory chf =
				(ApplicationConfigHandlerFactory) ctx.lookup("ApplicationConfiguration");
			Properties props = chf.getApplicationProperties();

Compartment: SAP_J2EE

DC: configuration

PP: default

One hint: you can even put configuration listener in order to effect changed configuration data without server instance restart.

Best regards,

Aliaksei