What is the best way of persisting Web-application related data?

My web-application needs to persist some data (a set of XML documents), i.e. save them so that they can survive server or application shutdowns. Saving those documents as files in server's filesystem does not seem to be convinient to me because the container may run the application directly form WAR and it is impossible (maybe I am wrong?) to modify files inside WAR archive. Forcing WAR extraction requires container reconfiguration and is container implementation dependent, which is not acceptable.
What would be ideal is some individual persistent storage bound to an application which does not require any external enitites (external databases etc). And this storage should not depend on any particular implementation of servlet container.
So is there a way to do something like this?

Saving it to disk seems like your only alternative.
Presuming you have at least some control over the machine where it is deployed to, you could specify a directory to save the xml documents to (ie not one under your web application structure) This would get around the limitations of the WAR file not being extracted.
Make the directory an environment variable/init parameter in your web.xml file.
All you need then is a directory on the server that you have write permissions to.
Ok it requires more setup when deploying the web application, but I thinks its about the only way to accomplish what you want to do.

Similar Messages

  • What is the best way to port complete applications from DEV - Test - PRD?

    Hi,
    One of my customers recently asked me, Supposing I do the complete integrations and modelling in SOA Suite on the DEV Environment. Then,
    What is the best way to port complete applications from DEV -> Test -> PROD ??
    Also, since the URLs in use in the DEV environment would be very different from other environments, what is the easiest way to maintain them, and to build in Access Control mechanisms ?
    Best Regards

    Hi AJ,
    Nice PDF !
    Though the PDF does give a basic idea as to how we can go about the deployments using ANT and EM in Test and Prod, it doesn't really give extensive details. For eg. ANT would obviously need huge ANT scripts to be written for migrations to multiple Test servers, etc.
    Similarly, when we talk about EM, does it mean each of the services has to be manually deployed on Production ?
    I am sure we would be looking more towards a fully automated solution. No ?
    Best Regards
    Nitin

  • What is the best way to port complete applications from DEV - Test - PROD

    Hi,
    One of my customers recently asked me, Supposing I do the complete integrations and modelling in SOA Suite on the DEV Environment. Then,
    What is the best way to port complete applications from DEV -> Test -> PROD ??
    Also, since the URLs in use in the DEV environment would be very different from other environments, what is the easiest way to maintain them, and to build in Access Control mechanisms ?
    Best Regards

    It has been discussed here in detail-
    SOA 11g  Composite Deployment across multiple Instances: Best Practice
    since the URLs in use in the DEV environment would be very different from other environments, what is the easiest way to maintain them, and to build in Access Control mechanisms ?You may use deployment plan for this purpose. For access control, you may use Role Based access of Weblogic and EM. Please refer -
    http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10226/appx_roles_privs.htm#BABIHDFJ
    Regards,
    Anuj

  • I have a PPC iMac 10.4.11 and will shortly buy a new i Mac.  What is the best way to transfer all my HD date from old to new? Thank you!

    I have a PPC iMac 10.4.11 and will shortly buy a new i Mac.  What is the best way to transfer all my HD date from old to new? Thank you!

    Migrating from PPC Macs to Intel Macs:
    https://discussions.apple.com/docs/DOC-2295
    How to use Migration Assistant:
    http://support.apple.com/kb/HT4413?viewlocale=en_US
    http://support.apple.com/kb/TS1963
    Troubleshooting Firewire target disk mode:
    http://support.apple.com/kb/HT1661

  • My Mum( a pensioner) is wanting to purchase both an iPhone and iPad.  What is the best way for her to manage her data /calls/txt etc. obviously the cost needs to be as low as possible.  Currently does not have WiFi but uses dongle

    My Mum( a pensioner) is wanting to purchase both an iPhone and iPad.  What is the best way for her to manage her data /calls/txt etc. obviously the cost needs to be as low as possible.  Currently does not have WiFi but uses dongle

    My Mum( a pensioner) is wanting to purchase both an iPhone and iPad.  What is the best way for her to manage her data /calls/txt etc. obviously the cost needs to be as low as possible.  Currently does not have WiFi but uses dongle

  • What is the best way to transfer all of my data from my iPod touch 3rd generation to my iPhone 4s?

    I have a 3rd generation iPod touch, and now I am getting an iPhone 4s. What is the best way to transfer all of my data, including paid-for apps and music, from the iPod to the iPhone without losing anything? Can I just do it through iTunes or the iCloud? I have never used iCloud before.

    Follow the directions here:
    http://support.apple.com/kb/HT2109

  • What's the best way for a web app to handle logins and sessions?

    I'm deploying in JBoss, using JSF. As is often the case, I keep User information in an entity bean. My question is, what's the best way to handle this bean?
    My inclination is to create a login page with a LoginBackingBean atached to it. When the user attempts to log in, it will see if there is a User entity bean that corresponds to the given name and password. If there is no User bean that matches, obviously we show an informative error screen.
    But what happens if there is a valid user?
    In the plain old Servlet world (without EJB / J2EE) I would just put the User object (it's an object, not an EJB) into the HttpSession, and I would create a Filter that would check for the presence of that User object, and I would map the filter to something like /members/*, and that would be it. I would use Hibernate to persist the User object, and there would also be a filter that creates a Hibernate session and stores it in the Request so that the User object would work and persist.
    How do I do this within the J2EE / EJB world?
    My first thought would be to just do the same thing. Install the User bean into the HttpSession, and create a filter and do all the same stuff. Is that the right way to do it? It would work pretty well with JSF because I could just access things in the normal JSF way: #{user.firstName} would find the "user" object in the HttpSession scope. So that's good.
    One question that comes up from that is if the user makes some change to the User object that is in the Session scope, will the EJB automatically do the right thing and make those changes persistent? Is there anything else I need to do?
    I'm new to the EJB world, but from what I can see so far, it seems like it's the best way to think about a web application.
    Thanks

    hi ,
    i think the best way is to create java beans ,in that bean call your EJB ,
    and check the validation over there.
    and make that bean scope to session.
    in each and everypage try to check the session ,if it is not valid then forward to your login page...
    otherwise continue to give access to him like guest
    Regards,
    AfTaB

  • What is the best way to read and manipulate large data in excel files and show them in Sharepoint

    Hi ,
    I have a large excel file that has 700,000 records in it. The excel file has a few columns that change every day.
    What is the best way to read the data form the excel file in fastest and most efficient way.
    2 nd Problem,
    I have one excel file that has many rows each row contain some data that has certain keywords.
    What I want is  to segregate the data of rows into respective sheets(tabs ) in the workbook.
    for example in rows have following data 
    1. Alfa
    2beta
    3 gama
    4beta
    5gama
    6gama
    7alfa
    in excel
    I want there to be 3 tabs now with each of the key words alfa beta and gamma.

    Hi,
    I don't really see any better options for SharePoint. SharePoint use other production called 'Office Web App' to allow users to view/edit Microsoft Office documents (word, excel etc.). But the web version of excel doesn't support that much records as well
    as there's size limitations (probably the default max size is 10MB).
    Regarding second problem, I think you need some custom solutions (like a SharePoint timer job/webpart ) to read and present data.
    However, if you can reduce the excel file records to something near 16k (which is supported rows in web version of excel) then you can use SharePoint Excel service to refresh data automatically in the excel file in SharePoint from some external sources.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • What is the best way to store and search 2D data

    Hi,
    There is a set of data (~10k records ) in 2D dimension.
    like this :
    Col 1, Col 2, Col3....
    What is the best way to store and search those records ?
    Thanks in advance
    Wilson

    Hi,
    Either userObjet[][] if you know how much data you have, and the data size is fixed, or use a list of lists. E.g. A Vector of Vectors (some will probably say that you should use an ArrayList instead, and that could be the case, but it sounds like you would want to display the data later on, and a DefaultTableModel (for JTables) uses a Vector as data holder).
    Kaj

  • What is the best way to deploy an application ??

    Hi,
    Please advise me how to automate in a best way to Deploy 10 different applications(.ear/.war)
    to 10 different Clusters(containing 40 Managed servers) in wls6.1......and that
    too in a Production environment.
    I know that we can use weblogic Console to deploy an application BUT if i have
    2 unix boxes and each box contains 4-4 clusters(each containing 16-20 managed
    servers) .....then i have to open up 2 Admin server consoles to deploy each of
    the respective applications and that too deploying these application to 8 clusters.....OR
    i can use deploy commad to do the same.
    AND if i have like 100 clusters .....then i would have to "deploy" 100 times ......
    is there any way that we can BEST AUTOMATE this process.
    Thanks a lot.
    -sangita

    Thanks Tommy. but i would like to know a very important point here: this is using
    the weblogic.utility that you just talkd about.
    Suppose iam having an ADMIN server that has say 10 clusters and 50 managed servers
    underneath to take care.
    1 cluster each = 5 managed server
    now iam deploying a simple .war file to say a single managed server, i have found
    out that it takes a looot of time to get the application deployed.
    what do you say about this situation ?
    what is the best approach ??????
    -sangita
    "Tomy Mathew" <[email protected]> wrote:
    >
    >
    To deploy the application from the command prompt in WebLogic 6.1 you
    use the
    following command
    $JAVA_HOME/bin/java -cp $WL_HOME/weblogic.jar weblogic.deploy -port $WEBLOGIC_PORT
    -host $WL_HOST_IP $WEBLOGIC_CMD $WEBLOGIC_PWD -component $WL_Server_NAME:$WL_Server_NAME
    $WL_APPLICATION_NAME YourApplication.war
    $WEBLOGIC_CMD sould be DEPLOY for the first time deployment and UPDATE
    for redeployment
    For deploying in a cluster you better create a shell script which call
    the above
    command with different cluster ip address as a parameter.
    Tomy
    "sangita" <[email protected]> wrote:
    Thanks Rob for your expertise advise. I would check to see wls8.1's
    ANT tasks.....for
    wls6.1, i would guess shell scripts to be a better option for us.
    thanks again.
    Rob Woollen <[email protected]> wrote:
    If you're using 8.1, then it's pretty nice to use ant for
    configuration/deployment/starting and stopping servers etc. There's
    a
    wlconfig task to do configuration, wldeploy to deploy applications,
    wlserver to start/stop servers.
    For 6.1, it's probably not a huge win to use ant. It's up to you.
    If
    you're more comfortable using shell scripts, that's certainly a
    reasonable route.
    -- Rob
    sangita wrote:
    Thanks Rob.
    But all the stuff that ANT can do for me FOR DEPLOYMENT (ONLY) .....ican do it
    from a simple shell script too.
    And i understand of ANT's cross-platform environment and usage of
    JAVA
    .....but
    can i use ANT to do something like CONFIGURING my wls6.1 managed
    servers/clusters/creating
    managed servers/db connection pools ......and all the other configurationthat
    i do from wls console(or manually) ....????
    and if yes, do you know of any examples, suggestions, ideas ?????
    basically, if i need to sell(?) ANT to my juniors ......what are
    the
    basic reasoning
    i can put forward....keeping in mind that these guys use wls6.1 &
    wls8.1......and
    these guys do CONFIGURATION and DEPLOYMENT only.
    sorry for asking, may be these silly questions.
    thanks, sangita
    Rob Woollen <[email protected]> wrote:
    sangita wrote:
    Thanks Rob.
    Rob, do you still consider or suggest using ANT for deploying say
    20
    applications
    on a 10 clustered environment.Yes
    do you see any advantages using [ANT + weblogic.deploy]..... over
    simply
    using
    weblogic.deploy utility ???Yes. ANT essentially gives you a cross-platform environment that
    allows
    extensibility through java. It's very powerful.
    -- Rob
    -sangita
    Rob Woollen <[email protected]> wrote:
    sangita wrote:
    Rob,
    I have found the answer for my question #1 ...this is the URL:
    http://edocs.bea.com/wls/docs81/admin_ref/ant_tasks.html
    iam still hoping to hear back from you for #2, #3
    thanks a ton.
    "sangita" <[email protected]> wrote:
    Thanks Rob.
    quick question:
    1) do you know of any example which illustrates the use of ANT
    wrapper....or
    please
    direct me to a URL where i can find some documentation about
    it.
    2) does this ANT wrapper has any advantages over using weblogic.Deployer
    utility
    ??If you're doing deployment via ant, then it's a bit more convenientto
    use <wldeploy> rather than invoking a raw <java> process, but
    fundamentally it's just a wrapper around weblogic.Deployer
    3) i would certainly check to see weblogic.deploy for wls6.1
    ....can
    i use ANT
    for deployment purpose in wls6.1 ?You'll just need to wrap it in a <java> task
    See:
    http://ant.apache.org/manual/CoreTasks/java.html
    -- Rob
    Rob Woollen <[email protected]> wrote:
    If you were using WLS 7.0 or later, you could use weblogic.Deployer.
    If
    you were using 8.1, you could use wldeploy which is an ant task
    wrapper
    for weblogic.Deployer.
    In WLS 6.1, you'll have to use weblogic.deploy which is a bit
    cumbersome, but it's still certainly possible to script deployment.
    -- Rob
    sangita wrote:
    Hi,
    Please advise me how to automate in a best way to Deploy
    10
    different
    applications(.ear/.war)
    to 10 different Clusters(containing 40 Managed servers) in
    wls6.1......and
    that
    too in a Production environment.
    I know that we can use weblogic Console to deploy an application
    BUT
    if i have
    2 unix boxes and each box contains 4-4 clusters(each containing
    16-20
    managed
    servers) .....then i have to open up 2 Admin server consoles
    to
    deploy
    each of
    the respective applications and that too deploying these applicationto 8 clusters.....OR
    i can use deploy commad to do the same.
    AND if i have like 100 clusters .....then i would have to "deploy"100 times ......
    is there any way that we can BEST AUTOMATE this process.
    Thanks a lot.
    -sangita

  • What is the best way to write 10 channels of data each sampled at 4kHz to file?

    Hi everyone,
    I have developed a vi with about 8 AI channels and 2 AO channels... The vi uses a number of parallel while loops to acquire, process, and display continous data.. All data are read at 400 points per loop interation and all synchronously sampled at 4kHz...
    My questions is: Which is the best way of writing the data to file? The "Write Measurement To File.vi" or low-level "open/create file" and "close file" functions? From my understanding there are limitations with both approaches, which I have outlines below..
    The "Write Measurement To File.vi" is simple to use and closes the file after each interation so if the program crashes not all data would necessary be lost; however, the fact it closes and opens the file after each iteration consumes the processor and takes time... This may cause lags or data to be lost, which I absolutely do not want..
    The low-level "open/create file" and "close file" functions involves a bit more coding, but does not require the file to be closed/opened after each iteration; so processor consumption is reduced and associated lag due to continuous open/close operations will not occur.. However, if the program crashes while data is being acquired ALL data in the buffer yet to be written will be lost... This is risky to me...
    Does anyone have any comments or suggestions about which way I should go?... At the end of the day, I want to be able to start/stop the write to file process within a running while loop... To do this can the opn/create file and close file functions even be used (as they will need to be inside a while loop)?
    I think I am ok with the coding... Just the some help to clarify which direction I should go and the pros and cons for each...
    Regards,
    Jack
    Attachments:
    TMS [PXI] FINAL DONE.vi ‏338 KB

    One thing you have not mentioned is how you are consuming the data after you save it.  Your solution should be compatible with whatever software you are using at both ends.
    Your data rate (40kS/s) is relatively slow.  You can achieve it using just about any format from ASCII, to raw binary and TDMS, provided you keep your file open and close operations out of the write loop.  I would recommend a producer/consumer architecture to decouple the data collection from the data writing.  This may not be necessary at the low rates you are using, but it is good practice and would enable you to scale to hardware limited speeds.
    TDMS was designed for logging and is a safe format (<fullDisclosure> I am a National Instruments employee </fullDisclosure> ).  If you are worried about power failures, you should flush it after every write operation, since TDMS can buffer data and write it in larger chunks to give better performance and smaller file sizes.  This will make it slower, but should not be an issue at your write speeds.  Make sure you read up on the use of TDMS and how and when it buffers data so you can make sure your implementation does what you would like it to do.
    If you have further questions, let us know.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • What is the best way to move all of my data from an iPad 4 to an air?

    Santa brought an iPad Air and I need to transfer my data and apps from the old iPad I have had.  Help on the best way to do this since I played with the new machine yesterday and some of the things transfered but not all.
    Thanks!

    How to Transfer Everything from an Old iPad to New iPad
    http://osxdaily.com/2012/03/16/transfer-old-ipad-to-new-ipad/
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    http://support.apple.com/kb/HT2109
    Moving Content to a New iPad
    http://tinyurl.com/qzk2a26
    Transferring your prepaid cellular data account depends on your carrier. AT&T lets you move it yourself when you go to Cellular Data in Settings and log into your account with your previous AT&T user name and password. For iPads with Sprint service, you can set up an account on the new iPad and contact Sprint Customer Care (888-211-4727 and go through the menus) to deactivate the old plan and get credit for unused service. For Verizon, call the company’s customer service number for mobile broadband support (800-786-8419) and ask to have your account transferred.
     Cheers, Tom

  • What is the best way to re-install my apps data when changing the hard disk

    My MacBook (120Gb disk) is finally full and I have ordered a 500Gb disk to replace it.
    I am fine with changing over the disk but can anyone tell me the best way to reload all my apps and data from the present disk please?
    I have a Time Machine backup on a Network disk, a copy of SuperDuper and also my original 10.5 OSX install disks.
    Thanks

    Roger, since you have SuperDuper, I think the easiest thing to do would be to make a clone of your current hard drive to the new one when it arrives. You will need an external enclosure for the new drive; make sure it's formatted to Mac OS Extended (Journaled); Disk Utility will do this for you. Then connect that new drive via firewire or USB, and create the clone from your current drive using SuperDuper. Next, remove the internal drive from your Mac, insert the new drive and boot up. You can then place your older drive in the external enclosure to use for extra storage, though it won't be large enough to use as a cloned backup with SuperDuper.
    Good luck!

  • What is the best way to keep Drivers up to date?

    Hi Guys
    I am looking to keep a range of makes and models drivers up to date. I have done a bit of reading through a few blogs and wondering if DPInst.exe through a required task sequence is the best way?; if SCUP 2011 is useable?;
    or is there a better way?
    Thanking you in advance
    NN

    I have done a post on the subject myself. The blog is mainly for my own purpose, but I hope you get the basics of it:
    http://www.imab.dk/extending-hardware-inventory-in-sccm2012/
    Martin Bengtsson | www.imab.dk
    Thats very interesting, thanks you.
    NN
    Oh, you might need to know how to use regkeytomof, which is the tool that generates the .mof edits you need:
    http://be.enhansoft.com/post/2014/02/13/How-to-Use-RegKeyToMof.aspx
    Martin Bengtsson | www.imab.dk

  • What is the best way to deploy Web Dynrpo DC without NWDI?

    Hi, SDN Fellow.
    We are currently developed our WDP DC without using NWDI (we are just creating local DC of the Web Dynpro project.)
    Now, we need to send our deployment archive to the sys. admin team to transport them to Dev from Sandbox.
    I just wonder should I just deploy the ear file that located in the .../dc_name/gen/default/deploy/xxx.ear by using SDM? Or there is a more proper way for us to deploy our WDP DC works?
    I know that I can just set up the J2EE engine of the Dev / QA box and deploy them, but it doesn't seems like the right procedure to do so.
    Please suggest, thanks.
    Thanks.
    Kent

    Hi, Maksim
    > >>but it doesn't seems like the right procedure to do
    > so.
    What I means it does not make sense is deployment through NWDS.
    System admin usually will not install a NWDS to deploy the ear, but they will use SDM to deploy the ear files.
    I just need to verify there is the best practice to do so.
    Thanks for your answer.
    Kent

Maybe you are looking for

  • Custom Positive Pay File

    Hi - I'm creating a positive pay file for my client (they are on Oracle Applications version 11.5.10.2), all has been successful with altering APXPOPAY, I've set this up under a custom directory and as a custom concurrent program. Users can submit th

  • Adding a Rev B to an AirPort network

    Ok, I have an AirPort network set up at my house that uses an AirPort Extreme (g) Base Station (AEBS) to connect to the internet. I can use that connection by using wifi connections from my iMac G4 (10.3.9), iMac G5 (10.4.10), PowerBook (10.4.10), an

  • FK10N

    Hi, In FK10N, there is a column: sales/purchase, what this column mean, i find sometimes the amount of this column does not match the credit balance of vendor, how SAP caculate the amount of this column? Thanks

  • Fields from 2 different Subject Area via inner or outer join

    Hi All I have a requirement where I have to pull columns which are available in 2 different Subject Areas. For eg. Col1 and Col2 in one SubjectArea1/Report1 and Col2 and Col3(obviously not available in SubjectArea1) in second SubjectArea2/Report2. Th

  • SQL protection - best practises

    I need some help to understand the difference between Express full backup vs. syncronization for SQL protection. I have always thought that the SQL logs were truncated during a Express full backup, but have read several articles that claim the opposi