Where is the best place to put an appication variable???

S

simon_s_li

Hi,

I need to store a value, which tells us what mode an application is in.

Basically it needs to be stored on an application level.

Can someone please advise me the best place to store this value, where
it can be accessed from any where within the system.

Thanks
Simon
 
R

Roedy Green

Can someone please advise me the best place to store this value, where
it can be accessed from any where within the system.

The easiest place is in a flat file. If you want to get fancy, in
Windows you can put it in the registry.

Probably the safest place is in a database.
 
S

simon_s_li

I already read the value from a xml file, but I need to store it
somewhere in the application at an application level.

The reason we need this is we aim to have 2 versions of the
application, but on 2 separate servers. What needs to happen is that
when the application deploys or loads, it reads an xml file and that
will decide what menus will be displayed based on the value.

This means it cannot be stored on the database because they both point
to the same database.

It cannot be in registry or flat file.

Any other ideas?

Regards
Simon
 
M

Malte

I already read the value from a xml file, but I need to store it
somewhere in the application at an application level.

The reason we need this is we aim to have 2 versions of the
application, but on 2 separate servers. What needs to happen is that
when the application deploys or loads, it reads an xml file and that
will decide what menus will be displayed based on the value.

This means it cannot be stored on the database because they both point
to the same database.

It cannot be in registry or flat file.

Any other ideas?

Regards
Simon

If webapp, store it in web.xml
 
K

Knute Johnson

I already read the value from a xml file, but I need to store it
somewhere in the application at an application level.

The reason we need this is we aim to have 2 versions of the
application, but on 2 separate servers. What needs to happen is that
when the application deploys or loads, it reads an xml file and that
will decide what menus will be displayed based on the value.

This means it cannot be stored on the database because they both point
to the same database.

It cannot be in registry or flat file.

Any other ideas?

Regards
Simon

Well I think I would store it as an instance or class variable in the
class where I read the XML file. No sense getting too complicated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top