I have an web application running on Solaris weblogic 7.
Now the requirement is such that we need to enable or disable certain features when implementing web app for different client. Means we need to implement same web app to other weblogic server.
The application has same EAR file. The only different is certain features will be unavailable on this new instance of same application.
 How to setup web application instances specific parameters ?
One solution is to create application.instance file. And then put check everywhere in applicable places to make feature visible and invisible.
 How do I setup application.instance file under weblogic server. I mean shall create environment variables in unix or keep it as text file and load and access from application while user navigation ?
The instances will be different subsets of same app EAR file.
I agree that it is code level control based on the particular instance running.
However, the question is what is the best way to recognize the particular instance?
Meaning I need some external parameter to recognize the instance from within application. For example, [i] Canada instance of application and [ii] US instance of application. Once I know which instance I am running within application, I can easily put check on the feature applicable within code.
I need to keep only one EAR file and additionally properties file which set the feature enable and disable. What is the best way to inform application that which particular instance is being launched? So that related logic can be executed for the needed functionality.
 Local WebLogic Server for development, we changed command script file C:\bea\weblogic700\server\bin\startWLS.cmd to include "-DInstance=Canada" in the variable "MEM_ARGS=" then use the code System.getProperty("Instance").toLowerCase() for the instance name. Then to do dev test we have to change the value of "-DInstance=Canada" for particular instance.
 For actual server QAT, UAT and PRD we have setup, we defined the attribute on console ex. Managed Server-->serverName-->configuartion-->Remote Start-->Arguments:-->-DInstance=Canada
Then code works same.
Arthur, where are your pants? Check under this tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss