Skip to Content

Define Configurable properties in an application and maintaining it using the J2EE Visual Administrator

Defining Configurable properties, would be of great help in any application deployment. A typical scenario that can be thought of would be, when an application is tested and promoted through a System landscape. i.e., when it moves from a development system to a testing system and finally on to a production system, some parameters are bound to change. Configurable properties come to the aid, with which the role of a programmer can be avoided.

When an application is developed and deployed using NetWeaver Developer studio, we can easily maintain these using available APIs. The steps for adding these configurable properties and maintaining it using the J2EE visual administrator are given below:-

  • Create Development Component of type WebDynpro. Create an Application, Component and a view in this. Create a properties (simple text file which can be created using any text editor) file with the name ‘default.properties’ and put it in the src –> Configuration folder of the project. In this case the properties are maintained at the Deployable object level. The option is there to maintain these at the Deployable object part level, which are Application, Component or Component Interface. In this document the sample is shown to include it at the deployable object level.

image

  • In the wdDoInit method write the following line of code: WDConfiguration.getConfiguration(“deployable object name (‘vendor name/project name’ in case of a DC)”).getStringEntry(“Key as maintained in the properties file.”);
    This would get the value for the specified key as maintained in the properties file.

To maintain these values using the visual admin the following steps are needed:-

  • Login to the Visual Administrator and select ‘Configuration Adapter’ under System ID –> Server Instance –> Services in the left side pane. Then in the right side pane expand webdynpro –> vendor name(com.wipro) –> project name(utilities).

image

  • After having switched to ‘Change’ mode, double click on the ‘Propertysheet default’ entry. The following screen is obtained. This has all the Key value pairs maintained in the properties file.

image

  • On double clicking on a particular property, the following screen is obtained where custom value can be maintained.

image
Note: If a custom value is maintained, a restart is required for this to take effect. Also if a re-deployment of the application is done, the values are overwritten by the properties file in the ear file.

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. manoj caisucar
    Hi,
    In the SAP EP 6 SP2 (6.20 WAS Engine) the ume security properties about userid and password were stored in the file
    “sapum.properties.bak”.
    ume.logon.security_policy.useridminlength=6
    ume.logon.security_policy.useridmaxlength=20
    ume.logon.security_policy.password_min_length=6
    ume.logon.security_policy.password_max_length=10
    ume.logon.security_policy.password_expire_days=9999

    I could access it in the code like.

    IUMParameters umProp = UMFactory.getProperties();
    Properties prop = umProp.getProperties();
    propertyValue = prop.getProperty(“ume.logon.security_policy.useridminlength”)

    I wanted to know what is there in case of Netweaver 2004
    and NW2004s.

    Is is stored in the file or some other location.
    Is possible how should I access it .

    Thanks And Regards
    Manoj

    (0) 

Leave a Reply