Design suggestion for application-wide configuration properties

Hello all
I am seeking opinions on how to design an application in which multiple classes have access to a common set of configuration properties that may change at runtime.
Until now, I would create an abstract class dedicated to initializing the properties set and enabling access to them from anywhere in the application through appropriate get/set static methods (most probably using an internal java.util.Properties object). Lately, my confidence in that approach seems to diminish.
So, I thought I should ask... do you see any issues with the above approach? Would you suggest any alternatives?
What I am essentially looking for here is a best practice to stick with from now on.
Thanks in advance
G

909773 wrote:
For example a 24x7 service that is supposed to handle requests on port X is very unlikely to need to change to port Y while running.
Or what happens if you have a plugin architecture and someone changes the root plugin directory to another directory.On the other hand, the maximum draw distance in a virtual world, an application's "skin", or a filesharing client's bandwidth limit are, in my view, properties that may very well need to change at runtime.
Seems reasonable to me. That is the easy part. The hard part is
1. How/when do you reload
2. How do you code your app so it gets the new values and uses themAs for 1, apologies if I haven't explained correctly: I am talking about properties that may change programmatically at runtime, e.g., by a user through a configuration dialog. Ok.
I can think of at least one way to deal with 2 (classes interested in all or a few of the properties implement some property listener interface and accordingly re-get values when notified about changes).That is how you detect it. It has nothing to do with whether the current running process is in a state that allows changes to be made.
all over the code reflects a wise design decision vs using a singleton property manager, references to a single property manager object (maybe even a java.util.Properties object) passed around through constructors, approaches involving dependency injection (not relying on any framework though), or else.Depends on the application. For example with a distributed system propogating the changes correctly so systems are not out of sync can be problematic.
Depends on the context in which your user makes changes. If it is an admin then it has the same context has if you were using a file. In that case I would use a singleton.
If it is a user changing part of the system, then you can't use a singleton. In that case you would need a context object from which other code derives the configuration values it uses. That is a one layer hierarchy and of course more levels require more complexity via a context object for each level.

Similar Messages

  • Application Module Configuration Properties file?

    Hi,
    Any body knows where could i find the Application Module Configuration Properties file on the disk.
    (This properties on wizard are appeared when we right click on application module and select configuration...)

    Curt,
    Thanks for your direction. That link is vary useful to be familiar with the AM configuration setting.
    Frankly, during last few months I was extremely busy to develop JSP pages. And didnt study much about AM But now that we are close to move the application to production I faced unacceptable problems. Recently I started to read your/and other folks treads to get more familiar with AM.
    Here is some of the problem i faced, which i think are AM related:
    1-The application speed goes down as soon as more than 2-3 browser(user) work with the same application(most probably I have memory leak).
    2-Some times I received following error when tried to load a JSP page in the application:
    Error Message: oracle.jbo.PCollException: JBO-28020: Passivation error on collection TXN, node id -1 void
    3-I faced following error when I tried to work with two applications in one or even two browsers:
    Error Message: JBO 30004: An application module that was not checked out was checked in...
    So, please let me know your idea on those and/or any point that I have to check.
    By the way, I am still on JDev9i-Beta and I accepted all default setting at the time I created AM . but the state of each page explicitly defined at the page level(mostly stateful, but on some of the pages i didn't mentioned the state which by default is stateless).
    Thanks.

  • Design Suggestions for Multiple DaqMX Task Streaming App?

    I'm working on a LabVIEW application in which I'm streaming high-speed data to disk from multiple PXI devices simultaneously.  Each device has its own DaqMX task, and all tasks stream to the same file.  The PXI device configuration (which devices are in the chassis, which slots they're in, and which channels to read from each device) is determined at runtime.
    Does anyone have a suggestion for a design model for this?  To make matters worse, I'd like to be able to specify a channel to monitor its data during the streaming.  I'm thinking the Producer-Consumer model is the basic approach, and I'm at the point where I have an array of DaqMX tasks, one for each device.  I could probably extend that array to be an array of clusters containing:
       1) DAQ Command (e.g. Initialize, Start, Stop, Acquire, etc)
       1) Task ID
       2) Control reference to 2-D array (where each DaqMX read can be stored)
       3) Array of channel names (to allow selection of channel to be monitored
    This could be passed as notifier data, to a data collection subVI, but the part I'm struggling with is finding the best way to run X number of tasks in parallel, where X is not known until runtime.
    Any suggestions would be appreciated.

    Thanks for the input.  With regards to the file format, the decision has been made by my superiors not to use TDMS - unfortunate, but NI hasn't provided the information to write a MatLab file reader, which is a requirement.  So, I've created a custom file format tailored to the needs of my application, but generic enough to be used for other apps. With it, I've been able to stream 8 channels at 800KHz (4 channels each from 2 PXI-6120s) without breaking a sweat.  However, the performance varies greatly depending on which slots the cards are in (but that's a whole different discussion - see the PXI forum for that one).  Once NI solves that one, I'll feel a lot more comfortable.
    I have already made reentrant subVIs that can perform a specific DAQ task.  The problem with a for loop is that the VI sits and wait for a start trigger, then acquires the streaming data.  I can't start the next VI because I'm in the first one.  I thought about creating a data collection VI, and this VI would start up to 6 other VIs in parallel, based on how many and which cards were present.  It's a bit messy, because each slot can contain one of two devices, so I'd need to check which type it was before calling it.  I'm thinking I'll have to create the task list and the references to the data in the main GUI loop, and then pass this using a notifier or queue to the data collection loop. 

  • Design Suggestion for Custom ADF Application

    Hi
    I have a custom database table.
    I have a custom database view which has query from multiple tables including the above table.
    The custom table in the view is joined with other tables by columns like inventory_item_id, organization_id etc.
    I have to show user a screen where the results of this view are shown in a table.
    The user should be able to enter some data in the screen for these rows.
    (he will be able to enter the data only for fields from my custom table)
    When he press save button, we should enter the new data given by user into the custom table
    along with some other values from view rows .. like inventory_item_id, organization_id etc ..
    Can you suggest a best approach to achieve this ?
    I have to use BC4J for Model and ADF For UI.
    As far as my knowledge goes, I think we will not be able to do this with an updateable view since we might hit the error
    ORA-01779: cannot modify a column which maps to a non key-preserved table
    Is there a design pattern we can follow in BC4J so that this can be achieved?
    Thanks for any help.
    Sameer

    Any view can be made updatable if you write INSTEAD OF triggers for it. That might be a good solution for you. You can also base a View Object on more than one Entity Object, and as long as there are good associations between the EOs it ought to work fine.

  • Suggestions for Application Monitoring Software

    Can anyone suggest software that will monitor applications to determine if they have crashed, and relaunch them if they have?
    I can't use Apple's Server Monitor as my server is a desktop Mac. We have an obscure app called iCalPublish that combines iCal .ics calendars and republishes it as one calendar. At least once a day it stops working with an error message requiring me to quit and relaunch. I wish I could find a replacement for iCalPublish but it seems the only app that combines calendars and it does it very well.

    TokyoTony wrote:
    I'd like to try something else please. The reason is as follows:
    When I put in a name for the document and then scan the documents, the file still comes up as untitled. I don't get that.
    When I want to rotate a page that is supposed to be landscape and do the rotation in Image Capture, all it does is cut the top and bottom out--it rotates the selection, not the image. I know I can do this in a PDF editor but why not have everything I need done in one application?
    When I do want to select A4 size, I don't see it unless I hide details. Seems a bit strange.
    Thanks,
    Tony
    Are you scanning into a program, or to a file? Either way, it seems to work for me with Preview. I didn’t try another app.
    I can’t replicate your other problems, either. Rotation works as expected and I have both Letter and A4 available on both interfaces.
    I have an Epson all-in-one, though.
    Perhaps if you listed your HP model number, others with that same printer/scanner could help.
    One thing to try, though. Log into another user on the Mac and try to scan. Same results?
    Boot into Safe Mode and try to scan. Same results?
    OS X: What is Safe Boot, Safe Mode?
    Those two steps will see if the problem is system-wide or caused by some additional software you have running at startup.

  • Design suggestions for a four 6500 layer 3 network?

    Hi folks,
    We've just purchased two 6509's with redundant sup720's and two 6506's with sup32's, and I need to configure them to replace our aging Extreme switches.
    Two will be in the MDF on ground floor, and two in the IDF on second floor. All floors have their own VLAN and IP subnet, and there is a datacenter VLAN for servers, and a firewall VLAN acting as a glue network to the internet.
    I'll use GigE channels for trunks between them in a fully meshed configuration.
    My question concerns how to configure the VSI's on each switch. Each subnet has a default gateway, but how to virtualize this among the sup modules? It seems that HSRP, VRRP, and GLBP are available, with GLBP being preferred(correct me if I'm wrong).
    Would I need to configure a separate VSI for each VLAN on each switch, then setup GLBP for all of them? Can this even be done?
    Help please because I'm out of my depth on this one. Thanks for any responses,
    Ian

    Couple of options here:
    1) You keep the Sup32's in the IDF Layer2 only, connecting with DOT1Q trunks to the 720s in the MDF. Only the 720s have the Layer3 SVIs.
    2) You configure the Sup32s as Layer3, with 'no switchport' Layer3 links to the 720s in the MDF. Each Sup32 has an SVI for each VLANs on its switch.
    Option 1 is your typical Campus Wide VLAN approach.
    Option 2 is a Routed Campus Design.
    Take a look at the attached document.
    Hope this helps.
    Please rate all helpful posts.
    Regards,
    Brad

  • Design Suggestions for Default Web Template

    I am starting to develop some web applications for 7.x and do not want to use the default BEx Web Template only because it offers so much functionality that either is too complicated for users, not needed by users, or we don't want them using.
    I am wondering how to approach this effort in developing a good default web template.  Does it make sense to use a default template since each query can be so different?
    Does anyone have any suggestions about what to include, exclude and why?  Any details about the template you designed would be greatly appreciated!
    Thanks

    Hi,
    Please refer the following URL:
    http://help.sap.com/saphelp_nw04/helpdata/en/44/b26a3b74a4fc31e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/281a3c9c004866e10000000a11402f/frameset.htm
    Thanks,
    Venkat

  • 3 Suggestions for Application icons

    1. Keep application icons in the same spot after an update. It's annoying to have to move the icon back to its place after each update.
    2. When moving icons around, allow for the scrolling of more than one window. Every time I have to drag the icon rightward to the next window then release it and do the same thing over and over and over again until its in the proper place. But this would be less of an issue if the first problem were fixed.
    3. Allow for additional windows to the left of the main window (not just to the right). Navigating to the proper window would be so much easier if I could scroll 2 windows to the right OR 2 to the left instead of 4 to the right. And I guess I could fix this by moving all of my front window icons to the 3rd window and placing the other icons on the 1st, 2nd, 4th and 5th windows, but see suggestion #2.

    As mentioned, update 2.1 fixes your first issue.
    Your second, I don't have that problem. I can drag an icon to side, it flips to next screen, then DON'T let go, just move to left just a tad then back right (just need to have it register a move) and then it will flip again...no need to let go and pick up again. Just a slight finger move is needed and I can understand why.
    Last, would be a nice update, but as suggested, this is a user to user forum, not a place for feedback. Can suggest at http://www.apple.com/feedback/iphone.html

  • IBook design suggestion for Apple

    For background, I've spent many years in the PC [but not Windows] world, and done plenty of work inside those spaghetti cable boxes. When I added a hard drive to my dual G5 powermac, I was duly impressed by the clean, elegant design, inside [!] the box.
    Meanwhile, I realized the time had come to put a bigger hard drive into my iBook, moving from 20 Gb in two partitions, to 100 Gb in three. There is excellent photographic advice on the web for the procedure, which is intricate but straightforward. There was the little issue of a stripped screw head, and some breath holding while I used a power drill to turn a phillips into a flat head.
    But all is well. Firewire target mode disk image and restore made that part of the process very simple, if time consuming. The new drive is faster and has a 16 Mb cache on board, so the iBook is more responsive.
    To the point of this subject:
    For some reason, the hard drive is buried in the bowels of the iBook, behind a wall of many many screws, phillips and torx head, to unscrew and screw, and cables to unplug and plug. Of all the hardware in there, the hard drive is probably the most likely to fail and need replacement.
    It should be EASILY accessible!!!
    For example, it could slide on rails similar to the ones that now hold it, and come out through a panel in the side where it sits. A panel that could be held by two screws [to make one think about opening it] and no more [to make it easy and quick].
    Flipping out the keyboard to install an airport card takes 5 minutes. Replacing a hard drive should take no longer. It would save Apple techs a lot of time, too.
    I'd like Apple to sprinkle some of that elegant design pixie dust onto this.
    Please.

    This is a user-to-user to forum, so it is unlikely that Apple will read your suggestion here.
    Try using the Feedback Form. In the PowerBook drop-down menu, you will find the iBooks listed. Leave your suggestion there. I would have already upgraded my hard drive if it were as easy as it is on a Windows laptop.

  • Design Suggestion for a new setup for a small office

    Hi Guys,
    We have a client requirement to setup a small business office to connect to its Head Quaters.
    Attached here with the sample High level design.
    My Question here is the above mentioned load balancer can used for this setup or not??? It can be connected to once again a router???
    Internet / Broadband BW would be 15 or 25 Mbps.
    Regards
    Karthik

    Hey qoool,
    You can leave feedback and request features added to the iPhone online here:
    http://www.apple.com/feedback/iphone.html
    Jason

  • Universe Design Suggestion for a Report

    Hi Guys,
    I am building a trend report from a fact table that was newly built in SQL server 2012.
    Prior to this table there was a manual process of data importing into SQL Server and then bringing into BO universe for reports.
    With the new change the fact table has data from both the old and new process.
    Basically the column looks like -
    Defect Type 2
    1 - new process
    2 - new process
    3 - new process
    4 - new process
    Missing - old process
    lost - old process
    Found - old process
    the developer has added id's instead of the description in  the new process.
    When I bring this in universe I join the id's to the look up table so that I can get the description.
    My question to you is regarding the data that already has description from old process - How can I bring all together in one report or if you can can suggest me a way to do this trend report.
    Also, there is a cut off date when the old process has moved to new code.  OR Should I bring this in 2 different tables.
    Any suggestions will be really helpful.
    Thanks,
    Jitan

    I was thinking of putting a filter on the fact table and do the join with all dimensions. This will give me data going forward with the automated process.
    For the manual process data that is sitting in the same table I will create a derived query to give me data for the old process and will bring it as another class.
    I am just thinking by doing this if I can combine both the dataset into one at report level.
    Let me know if i am going the right direction.
    Thanks,
    Jitan.

  • 'Design Patterns' for Application User Interfaces

    I'm currently trying to unstick an architectural mess centred around a relatively simple user interface. The problem is thus:
    The application has a number of toolbar buttons and menus, some of which require a specific frame or class of frame to be enabled. Some conditions are quite simple, others more complicated.
    (Without going into any more detail, it should be possible to appreciate that this is a fairly common problem.)
    For this application, I've created a large listener that accepts events from all over the program, converting them into state changes for UI controls. It feels messy, and (although it isn't finished) I suspect it'll be rather fragile.
    JBuilder 4 does it by constant querying of application state - but this results in excessive CPU usage and apparant lag.
    TogetherJ does it for menus by checking state immediately before showing the menu. This seemed like a good plan, but it's unsuitable for the Action/Button/MenuItem lashup I like to use.
    My question is this:
    In your opinion, how should an application be structured to reliably maintain the correct UI state at all times?

    Check out the mediator pattern. It is pretty close to what you are describing, maybe the details you dig up on it will give you some new ideas?

  • [iPhone] UI Design pattern for table views with properties and children?

    Hello,
    I'm getting started with iPhone development and I have a question about the proper way to display a list that has both properties of the list itself as well as the ability to drill down into the members of the list. For example, my data is a Group (of people say). The Group itself can have properties - the name of the group, group email address, web page, etc. - and it obviously has members which also have properties - name, address, etc.
    In my table view, I want to show the Group members and have accessory/disclosure buttons on each row to show the details of a person, but I also want to be able to edit the properties of the group - Group name, etc. What's the UI pattern for editing the properties of the table itself?
    I thought about having a tabbar that toggles between the list and the properties of the list.
    I also thought about having a parent table that lists the groups (so I could have more than one) and then have accessory buttons on each group row. The UI would then have to be that the user taps the row to drill down to the group members and taps the accessory button to edit the properties of the group. Is that "proper" - tap the bar or tap the accessory icon in a table row?
    Thanks

    I don't think I'd use a tab bar.
    You could break the table up into 2 sections, section 0 being the properties, section 1 the list.
    Make section 0 just say 'Properties', then when you tap that row you drill down to a properties table, slap an edit button in the navigation bar to go into edit mode.

  • BI design suggestion for KPI's

    Hi all,
    Need experts help on this.
    The customer has an online questionnaire that is collected across all the op. companies . The question will be an indicator that will have a value when the user fills it . It gets stored in a database. Being a question (indicator)  to the end user it will be little elobarate for e.g How many male employees working in your company (except subcontractors) or what is the production volume. The value could be 100 or 12000KG respectively. Each question will have a validity period and a indicator ID,  text in the database. This needs to be extracted into BI/BO for further analsyis based on the user responses.
    My assumption would be that the indicator will become a keyfigure in BI and I assume we have restriction of 60 chars length for char and keyfigure text . Is there a way to handle this in SAP BW of is there better way in designing this in BI
    Version we are going to use is SAP BI 7.01 and BO DS as ETL tool.
    Thanks and Regards,
    Srini

    Hi,
    Have you thought already on the solution like this:
    The assumption is that you have X KPIs in the questionaries .
    In BW cube you do not create X KeyFigures but only one or two (one per quantities and one per values in currency)
    In the fact table in the cube ther is an indicator what kind of KPI it is (the name of the KPI). As this indicator is build as characteristic you can maintain texts and attributes of KPIs.
    The fact table looks like this:
    KeyFigure1   KeyFigure2      KPI                         Customer          
    100                    -                 Name of the KPI 1          A
    -                      1200             Name of the KPI 2        A
    100                 -                   Name of the KPI 3         B
    etc...........................................
    Additionally you can switch on some attributes of the KPI  as navigational characteristic in the cube so you can report on this.
    Such design is flexible and allows to load data without any changes in the BI even if new KPIs has been created in questionaries.
    In the report you can use hierarchies or report in the standard way (with columns) e.g.
    HIERARCHY REport
    Name of KPI 1                  100
        Name of the KPI 2         1200
    or STANDARD COLUMN BASED REPORT
    Customer A           KPI 1             KPI        2             KPI 3
    A                           100                 1200                  -
    Regards

  • Design suggestion for content based routing

    Hi All,
    I have the following scenario.
    Based on one field in the file I have to take the following decisions.
    1)If field is 'R'. Then I should send a mail with some data to the concerned person.
    2) If filed value is 'V' . Then I should create file with the  input XMl.
    Venu.

    hi,
    just use condition editor in directory to
    do it (receiver determination)
    if r then one service which will send mail
    if v then another service with mapping etc
    it's all standard
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Maybe you are looking for