Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to setup multile instances specific parameters of a same web application ?

 
rakesh chauhan
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Please help me.

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.

[1] 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.

[2] 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 ?

Please advise better solution, if any.

Thanks
Rakesh
 
Nizan
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
rakesh chauhan
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


Thanks
Rakesh
 
Sachin Dangi
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rakesh,
i have couple of suggestions.

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 ]
 
rakesh chauhan
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sachin for the suggessions.

What we have done for now is as follow,

[1] 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.

[2] 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.

Thanks
Rakesh
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic