• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic