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 ?
I'd say that this is a code level process. WebLogic is a container+.
When you say 'multiple instances' do you mean copies of the same application deployed on more than one managed server?
Nizan Horsefield<br />Weblogic Support<br />BMW
Joined: Sep 07, 2004
Yes, that is what I exactly mean.
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.
1. You can obtain the IP address of the server at runtime and enable/disable features accordingly.
2. You can use properties file. keep a copy of this property file on each server [assuming each managed server is running on different solaris server].
sachin [ September 09, 2004: Message edited by: sachin ]
Joined: Sep 07, 2004
Thanks Sachin for the suggessions.
What we have done for now is as follow,
 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