What are Best Practice Recommendations for Java EE 7 Property File Configuration?

Where does application configuration belong in modern Java EE applications? What best practice(s) recommendations do people have?
By application configuration, I mean settings like connectivity settings to services on other boxes, including external ones (e.g. Twitter and our internal Cassandra servers...for things such as hostnames, credentials, retry attempts) as well as those relating business logic (things that one might be tempted to store as constants in classes, e.g. days for something to expire, etc).
Assumptions:
We are deploying to a Java EE 7 server (Wildfly 8.1) using a single EAR file, which contains multiple wars and one ejb-jar.
We will be deploying to a variety of environments: Unit testing, local dev installs, cloud based infrastructure for UAT, Stress testing and Production environments. **Many of  our properties will vary with each of these environments.**
We are not opposed to coupling property configuration to a DI framework if that is the best practice people recommend.
All of this is for new development, so we don't have to comply with legacy requirements or restrictions. We're very focused on the current, modern best practices.
Does configuration belong inside or outside of an EAR?
If outside of an EAR, where and how best to reliably access them?
If inside of an EAR we can store it anywhere in the classpath to ease access during execution. But we'd have to re-assemble (and maybe re-build) with each configuration change. And since we'll have multiple environments, we'd need a means to differentiate the files within the EAR. I see two options here:
Utilize expected file names (e.g. cassandra.properties) and then build multiple environment specific EARs (eg. appxyz-PROD.ear).
Build one EAR (eg. appxyz.ear) and put all of our various environment configuration files inside it, appending an environment variable to each config file name (eg cassandra-PROD.properties). And of course adding an environment variable (to the vm or otherwise), so that the code will know which file to pickup.
What are the best practices people can recommend for solving this common challenge?
Thanks.

HI Bob,
As sometimes when you create a model using a local wsdl file then instead of refering to URL mentioned in wsdl file it refers to say, "C:\temp" folder from where you picked up that file. you can check target address of logical port. Due to this when you deploy application on server it try to search it in "c:\temp" path instead of it path specified at soap:address location in wsdl file.
Best way is  re-import your Adaptive Web Services model using the URL specified in wsdl file as soap:address location.
like http://<IP>:<PORT>/XISOAPAdapter/MessageServlet?channel<xirequest>
or you can ask you XI developer to give url for webservice and username password of server

Similar Messages

  • What are best practices for managing my iphone from both work and home computers?

    What are best practices for managing my iphone from both work and home computers?

    Sync iPod/iPad/iPhone with two computers
    Although it isn't possible to sync an Apple device with two different libraries it is possible to sync with the same logical library from multiple computers. Each library has an internal ID and when iTunes connects to your iPod/iPad/iPhone it compares the local ID with the one the device normally syncs with. If they are the same you can go ahead and sync...
    I have my library cloned to a small 1Tb USB drive which I can take between home & work. At either location I use SyncToy 2.1 to update the local copy with the external drive. Mac users should be able to find similar tools. I can open either of the local libraries or the one on the external drive and update the media content of my iPhone. The slight exception is Photos which normally connects to a specific folder on a specific machine, although that can easily be remapped to the current library if you create a "Photos" folder inside the iTunes Media folder so that syncing the iTunes folders keeps this up to date as well. I periodically sweep my library for new files & orphans withiTunes Folder Watch just in case I make changes at one location but then overwrite the library with a newer copy from the other. Again Mac users should be able to find similar tools.
    As long as your media is organised within an iTunes Music or Tunes Media folder, in turn held inside the main iTunes folder that has your library files (whether or not you let iTunes keep the media folder organised) each library can access items at the same relative path from the library folder so the library can be at different drives/paths on different machines. This solution ensures I always have adequate backups of my library and I can update my devices whenever I can connect to the same build of iTunes.
    When working with an iPhone earlier builds of iTunes would remove any file not physically present in the local library, even if there was an entry for it, making manual management practically redundant on the iPhone. This behaviour has been changed but it will still only permit manual management with a library that has the correct internal ID. If you don't want to sync your library between machines on a regular basis just copy the iTunes Library.itl file from the current "home" machine to any other you want to use, then clean out the library entires and import the local content you have on that box.
    tt2

  • What are the browser recommendations for best viewing iWeb 08 site on a PC?

    What are the browser recommendations for best viewing iWeb sites on a PC? Can't find any info on Apple iWeb site.

    Hi,
    I don't think there are recommendations from Apple.
    What I can say is that the newest version of InternetExplorer at the UniversityCampus is working great with my website I didn't find any problem (Menus, Slideshows, text displaying, pictures everything worked great). There are IE problems reported in other threads but I think they refer to older IE versions (seems like most IE users still have older versions on their PCs).
    Newest Firefox will work too.
    Reagrds,
    Cédric

  • Where does one find the Oracle Best Practice/recommendations for how to DR

    What is the Oracle Best Practice for install/deployment and configuration of ODI 11g for Disaster Recovery?
    We have a project that is using Oracle ODI 11g (11.1.1.5).
    We have configured all the other Oracle FMW components as per the Oracle DR EDG guides. Basically using the Host ip name/aliasing concept to ‘trick’ the secondary site into thinking
    it is primary and continue working with minimal (or no) manual reconfiguration. But will this work for ODI? The FMW DR guide has sections for SOA, WebCenter and IdM, but nothing for ODI.
    Since ODI stores so much configuration information in the Master Repository..when this DB gets ‘data guarded’ to the secondary site and promoted to Primary…ODI will still think it is at the ‘other’ site. Will this break the actual agents running the scenarios?
    Where does one find the Oracle Best Practice/recommendations for how to DR ODI properly?
    We are looking for a solution that will allow a graceful switchover/failover with minimal manual re-configuration.

    user8804554 wrote:
    Hi all,
    I m currently testing external components with Windows Server and I want to test Oracle 11g R2.
    The only resource I have is this website and the only binaries seem to be for Linux OS.You have one other HUGE resource that, while it won't answer your current question, you'd better start getting familiar with if you are going to use Oracle. That is the complete and official documentation, found at tahiti.oracle.com
    >
    Does anybody know how I can upgrade my Oracle 11.1.0.7 version to the R2 release?
    Thanks,
    Bertrand

  • What are the pre-requisite for JAVA Proxy communication?

    What are the pre-requisite for JAVA Proxy communication?

    Hi,
    You can install the Java proxy runtime on the SAP J2EE Engine Release 6.40 SP5 or higher.
    The messaging system that the Java proxy runtime uses to send messages to the Integration Server must also be installed on the J2EE server.
    To send messages from a J2EE application, the application must be programmed against beans that encapsulate all details about the Java runtime. The following classes are generated:
    ·        Proxy classes that send or receive messages using the Java proxy runtime.
    ·        Bean classes as an outer shell that conform to the J2EE standard. The beans call the proxy classes for communication.
    The classes must be deployed on the J2EE server together with their J2EE application
    see this link for the example scenario http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d

  • Any best practice recommendations for controlling access to dashboards?

    Everyone,
         I understand that an Xcelsius dashboard compiled into a .swf file contains no means for providing access control to limit who can or how many times they can run the dashboard. Basically, if they have a copy of the .swf they can use it as much as they'd like. To protect access to sensitive data I'd like to be able to control who can access the dashboard and how many times or how long they can access it for.
         From what I've read it seems the simplest way to do this is to embed the swf file into a web portal that requires a user to authenticate before accessing the file. I suppose I can then handle how long they can access it from the back end.
         If I do this, is there anyway a user can do something like <right click - save as> on the flash file to save it on their local machine? Is there a best practice means for properly protecting the dashboard?
    Any advice would be appreciated,
    Jerry Winner

    Everyone,
         I understand that an Xcelsius dashboard compiled into a .swf file contains no means for providing access control to limit who can or how many times they can run the dashboard. Basically, if they have a copy of the .swf they can use it as much as they'd like. To protect access to sensitive data I'd like to be able to control who can access the dashboard and how many times or how long they can access it for.
         From what I've read it seems the simplest way to do this is to embed the swf file into a web portal that requires a user to authenticate before accessing the file. I suppose I can then handle how long they can access it from the back end.
         If I do this, is there anyway a user can do something like <right click - save as> on the flash file to save it on their local machine? Is there a best practice means for properly protecting the dashboard?
    Any advice would be appreciated,
    Jerry Winner

  • What are best practice for packaging and deploying j2EE apps to iAS?

    We've been running a set of J2EE applications on a pair of iAS SP1b for about a year and it has been quite stable.
    Recently however we have had a number of LDAP issues, particularly when registering and unregistering applications (registering ear files sometimes fails 1st time but may work 2nd time). Also We've noticed very occasionally that old versions of classes sometimes find their way onto our machines.
    What is considered to be best practice in terms of packaging and deployment, specifically:
    1) Packaging - using the deployTool that comes with iAS6 SP1b to package is a big manual task, especially when you have 200+ jsp files. Are people out there using this or are they scripting it with a build tool such as Ant?
    2) Deploying an existing application to multiple iAS's. Are you guys unregistering old application then reregistering new application? Are you shutting down iAS whilst doing the deployment?
    3) Deploying ear files can take 5 to 10 mins, is this normal?
    4) In a clustered scenario where HTTPSession is shared what are the consequences of doing deployments to data stored in session?
    thanks in asvance for your replies
    Owen

    You may want to consider upgrading your application server environment to a newer service pack. There are numerous enhancements involving the deployment tool and run time layout of your application that make clear where you're application is loading its files from.
    If you've at a long running application server environment, with lots of deployments under your belt, you might start to notice slow downs in deployment and kjs start time. Generally this is due to garbage collecting in your iAS registry.
    You can do several things to resolve this. The most complete solution is to reinstall the application server. This will guarantee a clean ldap registry. Of course you've got to restablish your configurations and redeploy your applications. When done, backup your application server install space with the application server and directory server off. You can use this backup to return to a known configuation at some future time.
    For the second method: <B>BE CAREFUL - BACKUP FIRST</B>
    There is a more exhaustive solution that involves examining your deployed components to determine the active GUIDS. You then search the NameTrans section of the registry searching for Applogic Servlet *, and Bean * entries that represent your previously deployed components but are represented in the set of deployed GUIDs. Record these older GUIDs, remove them from ClassImp and ClassDef. Finally remove the older entries from NameTrans.
    Best practices for deployment depend on your particular environmental needs. Many people utilize ANT as a build tool. In later versions of the application server, complete ANT scripts are included that address compiling, assembly and deployment. Ant 1.4 includes iAS specific targets and general J2EE targets. There are iAS specific targets that can be utilized with the 1.3 version. Specialized build targets are not required however to deploy to iAS.
    Newer versions of the deployment tool allow you to specify that JSPs are not to be registered automatically. This can be significant if deployment times lag. Registered JSP's however benefit more fully from the services that iAS offers.
    2) In general it is better to undeploy then redeploy. However, if you know that you're not changing GUIDs, recreating an existing application with new GUIDs, or removing registered components, you may avoid the undeploy phase.
    If you shut down the KJS processes during deployment you can eliminate some addition workload on the LDAP server which really gets pounded during deployment. This is because the KJS processes detect changes and do registry loads to repopulate their caches. This can happen many times during a deployment and does not provide any benefit.
    3) Deploying can be a lengthy process. There have been improvements in that performance from service pack to service pack but unfortunately you wont see dramatic drops in deployment times.
    One thing you can do to reduce deployment times is to understand the type of deployment. If you have not manipulated your deployment descriptors in any way, then there is no need to deploy. Simply drop your newer bits in to the run time space of the application server. In later service packs this means exploding the package (ear,war, or jar) in to the appropriate subdirectory of the APPS directory.
    4) If you've changed the classes of objects that have been placed in HTTPSession, you may find that you can no longer utilize those objects. For that reason, it is suggested that objects placed in session be kept as simple as possible in order to minimize this effect. In general however, is not a good idea to change a web application during the life span of a session.

  • Best practice recommendation for locale-specific text/labels

    What is the recommended best practice approach to supporting locale-specific
    text for labels, messages when using Jdeveloper to create applets and applications.
    I am familiar with resource bundles, but wonder if there is a better approach within
    JDeveloper. Are there any plans to enhance this area in 9.0.3?

    I am familiar with resource bundles, but wonder if there is a better approach within
    JDeveloper. Resourcebundles are the java-native way of handling locale-specific texts.
    Are there any plans to enhance this area in 9.0.3? For BC4J, in 9.0.3, all control-hints and custom-validation messages (new feature) are generated in resource-bundles rather than xml-files to make it easier to "extend" for multiple locales.

  • Just updated to CC 2014. Interested in best practice recommendations for converting INDD hi-resolution print layout files to .jpeg for use on a portfolio preview website

    Seeking recommendations for best practices for converting hi-res magazine INDD docs to .jpgs for web portfolio

    Export to a hi-res PDF, then do your conversion in Photoshop where you have more control.

  • Best practice recommendations for Payables month end inbound jobs

    During Payables month end we hold off inbound invoice files and release them once the new period is open so that invoice get created in new fiscal period. Is this an efficient way to do? Please advise best practice for this business process.
    Thanks

    Hi,
    Can someone provide your valuable suggestions.
    Thanks
    Rohini.

  • What are popular automated tests for Java GUI applications

    Hi, I want to find a good automated test for java swing for my project. I have a list of UISpec4j, JFCUnit and Abbot.

    There is also jemmy. I haven't used any of them, though...
    -Puce

  • What are best practices for connecting asa to nexus 5000

    just trying to get a feel for the best way to connect redundant asa to redundant nexus 5000
    using a vpc vlan is fine, but then running a routing protocol isn't supported, so putting static routes on 5000 works, but it doesn't support ip sla yet so you cant really stop distributing the default if your internet goes down. just looking for what was recommended.

    you want to test RAC upgrade on NON RAC database. If you ask me that is a risk but it depends on may things
    Application configuration - If your application is configured for RAC, FAN etc. you cannot test it on non RAC systems
    Cluster upgrade - If your standalone database is RAC one node you can probably test your cluster upgrade there. If you have non RAC database then you will not be able to test cluster upgrade or CRS
    Database upgrade - There are differences when you upgrade RAC vs non RAC database which you will not be able to test
    I think the best way for you is to convert your standalone database to RAC one node database and test it. that will take you close to multi node RAC

  • What are best practices for rolling out cluster upgrade?

    Hello,
    I am looking for your input on the approaches to implement Production RAC upgrade without having a spare instance of RAC servers. We have a 2-node database RAC 11.1 on Production. We are planning to upgrade to 11.2 but only have a single database that the pre-Production integration can be verified on. Our concern is that the integration may behave differently on RAC vs. the signle database instance. How everybody else approaches this problem?

    you want to test RAC upgrade on NON RAC database. If you ask me that is a risk but it depends on may things
    Application configuration - If your application is configured for RAC, FAN etc. you cannot test it on non RAC systems
    Cluster upgrade - If your standalone database is RAC one node you can probably test your cluster upgrade there. If you have non RAC database then you will not be able to test cluster upgrade or CRS
    Database upgrade - There are differences when you upgrade RAC vs non RAC database which you will not be able to test
    I think the best way for you is to convert your standalone database to RAC one node database and test it. that will take you close to multi node RAC

  • What are best practices for back up drives when they become full?

    I've got an external hard drive that is now full. What do I do? Delete the oldest files on it, right? If so, do I delete the full backup and ALL the incremental backups since then? Do I have to do this manually now; isn't there a way to automate this?

    The "usual" procedure is to move the oldest incremental backups from the hard drive to permanent storage media such as DVD.
    However, if your backup drive is the same size as your main drive, then you could do incremental backups that delete files on the backup druve that have been deleted from the source drive. This prevents the drive from filling up with old and out of date files. However, if you need to maintain archives of even the incremental backups, then move the oldest to permanent storage media and delete them from the backup drive to free space.
    Visit The XLab FAQs and read the FAQ on backup and restore for more information.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Media on Network Share - What are Best Practices

    I love my first Mac computer- the Macbook Air, but I've definitely been hitting a lot of obstacles migrating over to the Mavericks. Getting iTunes working in a similary fashion to how I had it working on WIndows.
    Today its been automatically mounting the Media files on my NAS when I log into my Macbook so that I can start using iTunes right away .
    Originally I had an nfs share called /mnt/Media that FInder put on /Volumes/Media  , but would not do it automatically. 
    Next, I created a CIFS share called Media and Finder mounts it on Volumes/Media. Not only that, but I was able to share the password to my keychain, and add it to my user account's "login items" menua, and it connects on login, even after a reboot
    So far, so good.
    Now, I assumed since the mount path had not changed, that ITunes would open up and start using the libary as every was exactly where is was before.
    But no, it could not find anything, all my media came up as "not found"  and it acted as if was in my home folder Music/Itunes/Media folder.
    I copied the Itunes medial library.xml file to a temp folder, changed the paths to the /Volumes/Media folder, and I am now imported that as a playlist.  I hope that this works.
    Question: What is the best way to manage a library where the media files are on network storage? I fear that another glitch is waiting to happen. I'd store them on my Mac, but my  collection of media files is larger than the SSD hard drive.  Way larger.
    *Me Whining* I can't be the first one to have these issues, and with home NAS servers becoming more popular every day, I feel that Apple should come up with an official solution.

    After tons of research I just see the same problems over and over. It looks like there isn't a good solution now. I discovered that if a save credentials in my keychain, add the share to my login items, and a shortcut to my desktop, that at least makes it easier to reconnect to shares. I have to remember to reconnect before firing up iTunes , but it's the best solution for now.

Maybe you are looking for