How to update non-jars?

Hello,
In my JWS app I save on the user system a db.sqlwrapper database, for the app consumption (not read-only). I now need to make a change to the schema, of the db.
Is it possible that users on their next update (launch of the app) they once only execute java code that would do the required (perhaps in some extra .jar) and then not again (since the change needs to be done only once)?

Easiest way would be to provide a db upgrade mechanism. I'd suggest numbering your upgrades and creating a table where you store executed upgrades. On application startup (or db startup if they differ), you'll just need to check the presence of upgrades higher than the last executed one.
I've been doing this for a long while.
In my case it's even easier 'cause I've got both a read-only db and a user one.
I record upgrades by number and key (actually keys comma separated) in the read-only db (that gets updated through JWS), storing SQL instructions in a property file (I read using the key retrieved in the DB).
That's it: select max(required upgrade) as A from readOnly.UP, select max(executed update) as B from userDB.UP, if A>B for each key K in readOnly.UP where K>B, split K, for each part of K read property and add text as batch, once done cicling through K.parts execute batch and insert new line in userDB.UP.
One last thing: at the end of userDB creation you should insert a line in the userDB.UP to mark out your DB version.
This way you'd be able to upgrade your db schema (and data if needed) whenever you like.
Bye.

Similar Messages

  • How to update/replace Jars within sbconfig.jar during import

    Hi,
    I want to replace a jar file, used by java callout actions, during import. I am using WLST script to import configuration jar but cannot figure out how to replace jar file.
    That jar file contains environment specific properties which i intend to change as part of import, once config jar is uploaded and impoted within the same session.
    I have looked to Ref, ArchiveType, Refs, and ALSBConfigurationMBean, but cant figure out to replace specific jar file within imported config jar.
    Many thanks in advance!
    many thanks
    sal
    Edited by: sallo on 16-Feb-2010 07:40

    Hi vivik,
    I am already using custimization files to already to customize environment values etc. But what i need cannot be handled by the customization file.
    I want to replace a jar file (utility jar), already in the sbconfig jar, being referenced by Java Call out actions during import process. I am begining to convince myself that it is not possible to perform such action during import process. I have checked the MBeans API but not very helpful.
    I hope i have able to explain the problem here!
    many thanks
    sal

  • How to Update Jar Files

    Can u tell me how to update an JAR file .
    I have a jar file ,I would like to add a class in that jar.
    I am able to add it but it goes
    into the root folder where as i want it go in one of the sub folder.
    Eg
    TEST.JAR
    The structure is
    Server\a.class
    Server\folder1\b.class
    Server\folder2\c.class
    Now when i add the class it goes to
    Server\a.class
    Server\folder1\b.class
    Server\folder2\c.class
    my.class
    where as i want it to go in
    Server\folder1\my.class

    Show the code you use to add it to the JAR, and we will attempt to fix it. Don't forget to put it around [code]  tags

  • How can i add update signed jar file

    I am developing an applet which requires signing to run in a browser.
    I am developing supporting classes. But these class files have to be added
    to the jar. Isnt it??
    But to test the applet i need to load it in the browser each time i modify the class files. So the jar file need to be updated every time. But an
    IOError
    is being displayed when i try to update the signed jar file.
    How can i update signed jar file?? Or is there any othe way to test the signed applet during development??

    How can i update signed jar file?You can't, the signature is there to make sure the content of the jare hasn't been messed
    with.
    Either recreate the jar and re sign it or set up a policy during testing.

  • How to stop non statistical condition type value from updating total amount

    Gurus,
    Can any body explain me how to do following setting,
    How to Stop non statistical condition type value from updating Total Amount
    Regards,
    Sai

    Dear Sai,
    You need to make that condition type as Statistical one
    Go to SPRO - Sales and Distr. - Basic Functions - Pricing - Define and Assign Pricing Proc - Maintain Pricing Proc - Control Date
    Select the proc. - select the condition type and activate the  check box Statistical
    This will show the amount of the condition but will not consider for the net value calculation
    Hope this will help you
    regards,
    Sagar

  • How to update JAR through URL

    Hello,
    I have implemented a standalone JAR file for windows, that runs in a system tray for our users to use. The application is using URL class to connect to our server and feed information. Trouble is that from time to time it may be necessary to update files packed in this JAR to give it other features. Instead of asking our users to download the JAR, I would like to have an option to update this JAR with a new JAR from the server, consequently using URL class.
    Could somebody please give me an idea on how to "download" a new JAR version and "replace" it with the existing one? So essential this should work as your typical "check for updates" feature. Any ideas on this matter will greatly be appreciated.
    Thank you,
    Victor.

    Java Web Start

  • Downloading non-jar resources

    Hi,
    I would like to download a configuration file for the downloaded application. For example a config file named LookAndFeel.cfg which is not packaged into the jar file. This could enable changing the LookAndFeel of the app through changing only the configuration file on the server. But in the resources tag of the jnlp file I only can specify jar files and images. How do I specify downoading any non-jar and non-image resources before starting the app?

    Why not create 2 or 3 jar files.
    1 = all the code
    2 = various .cfg files.
    then when you want to change .cfg, just update the short jar with the .cfg files.
    Don't forget the whole advantage of web start is the automatic download of changed .jar files
    and the persistence of old files.

  • How to update or delete records in a Complex View in Forms?

    Hi,
    I have a requirement to create a Form by using Complex View. Insertion is possible but updation and deletion is not working properly . I got FRM-40501 Error. I need How to update or delete records in a Complex View in Forms?
    Thanks & Regards,
    Hari Babu

    Depending on how complex your view is, forms is not able to determine how to appropiately lock a record, when you try to update or delete a record.
    One approach to using complex views in forms:
    1. Set the Key-mode of the block to "Non-Updateable"
    2. Mark the column which can be used to build the WHERE-condition to uniquely identify a record with "Primary Key" = "Yes"
    3. For doing INSERT, UPDATE and DELETE, create an INSTEAD-OF-trigger on the view.
    4. Create your own ON-LOCK-trigger in forms which does the locking of the records to update.

  • How to run JavaFX Jar with JRE 7 on MAC OS Lion 10.7.5 ?

    I had java 1.6 installed on my MAC OSX Lion 10.7.5. When I am trying to run that JavaFX application jar
    java -jar application.jar
    It always shows a dialog "The application require a newer version of Java Run-time" with download link. Even I have downloaded and successfully installed it on my MAC machine but it still shows me the same window.
    It installed jre-7u10-macosx-x64.dmg but java -version is always point to 1.6.
    Then I searched for Java Preferences to point the current JRE 1.7 but I could find Java Preferences at Applications -> Utilities -> Java -> Java Preferences.
    I found an Java Icon on System Preference. When I am trying to open that widow it's showing me error -- the java control panel opens in a separate window and nothing happens when we click on Re-open the Java Control Panel.
    http://avats.s3.amazonaws.com/JavaRunningError.txt
    I would like to know -- how to run JavaFX jar with JRE7 on MAC OS Loin 10.7.5? Is their any other way to run the JavaFX application JAR with JRE7?

    To find a copy of LP7 you would need to look for a copy on eBay.. However, the protection method used with LP7 no longer functions so you cannot register it and therefore you cannot use it. unless you have already registered LP7 yourself in the past using the security key dongle provided
    Any version of LP7 from a torrent would be an illegal (and most likely non working) version due to the protection that was used at that time... and so posting about it here, was not be wise.
    So.. thats why my previous answer was so brief... Simply put, you cannot use LP7 unless you already have a validated and registered security dongle... even if you found a copy of LP7 somewhere
    The only practical solution is to find some kind soul who already has a working version of LP7 installed, that you can send the projects to... for them to do the conversion for you.
    I would, but I no longer have LP7 installed here on any of my testbed Macs...

  • How to update my ibook G4 with out itunes

    how to update my ibook G4 with out itunes

    Your question begs more questions before an answer...
    What are you trying to upgrade, and why would you try to use iTunes
    in a vintage G4 computer that cannot run an OS X later than 10.5.8
    at best? (and only if it has a processor at least 867MHz or better)
    With at least a 1.0GHz iBook G4 you could run Leopard 10.5.8, and
    the system requires a retail DVD to install the 10.5, then go online
    after installation, to get the Combo 10.5.8 update, by use of Software
    Update within that first earlier system...
    If the computer does not have at least the minimum processor, it would
    not be able to see Leopard as a system, so Tiger 10.4.11 is the last...
    http://www.apple.com/support/leopard/
    iTunes does not upgrade or update much of anything in an obsolete &/
    or vintage Mac OS X before the Intel-Mac era, and prior to OS X 10.6.8.
    If your computer does not have an iTunes version at all, you can go to
    Apple support downloads and look at older iTunes, and older safari,
    and some other bits that are limited to their respective vintage OS X.
    Usually the upgrade path utilizes DVD media or CD media, for software
    & depending on what kind of software, then later get update-downloads.
    To see if there may be anything not already installed in the system or
    applications that could exist in the Apple support download servers,
    you could see if the System's own Software Update, located in Apple
    Menu in upper left side of the menu bar in Finder, can locate some.
    If you perform a new install and did not save all the bits as downloaded
    from when they were more current, some updates to original media that
    formerly were online and available as download (step updates, not full
    upgrades) you may eventually be unable to upgrade then update an older
    OS X system; the remainder of the later or last fixes were in the update.
    So, if you have an old G4 PowerPC Mac computer running, say Tiger 10.4.3
    and thought to use some software intended to run in Tiger 10.4.11, then
    you'd have to see if Software Update could find the 10.4.11 Combo update.
    After updating the main system, other applications may also see a need to
    be updated, if they were not already as far as they could go, in their vintage.
    iPhoto, and other applications, such as they were, had updates to their main
    application. So with iTunes, the last version that can work in a PPC G4/G5
    non-intel would be in the last supported OS X, Leopard 10.5.8, and that
    version number is iTunes 10.6.3; so you can't visit an App Store or Mac App
    Store nor can you run Snow Leopard on a PowerPC architecture Mac.
    With the intel-based Mac, and Snow Leopard, you can access the online
    Stores to include recent Mac Apps, App Store, iTunes Store, etc. A light
    version of early iTunes (see iTunes Player) can be seen, and their Radio
    still plays free music channels. I have several older pre-Intel Macs...
    The matter involves the vintage of the device, the system, and limits of the
    old vintage/obsoleted configurations where both are interdependent.
    Not sure if this helps, but more of a history lesson may be read if you look
    into everymac.com and compare models, build years, and other specs...
    If you need some feature or function not supported by vintage hardware or
    vintage software, or a newer web browser, you have to look further. A fair
    browser can be found in TenFourFox. I use it daily in a PPC G4 MINI 1.5GHz.
    with Leopard 10.5.8. Plus others. To go further, look into an Intel-based Mac
    such as MacBook2.1 & then buy the Snow Leopard retail DVD for about $20.
    Hopefully this helps somewhat...
    Good luck & happy computing!

  • Can't seem to change the Document Properties Advanced Reading Options in a Form that was created in Adobe LiveCycle. This option has been "greyed" out - anyone know how to update this to English so I can pass Accessibility Testing?

    Can't seem to change the Document Properties > Advanced > Reading Options in a Form that was created in Adobe LiveCycle. This option has been "greyed" out - anyone know how to update this to English so I can pass Accessibility Testing?

    LiveCycle forms use a very different approach to create a PDF form than Acrobat and that approach makes many features for processing PDFs non-functional.
    You might want to ask this question in one of the LiveCycle product forums.

  • How to update iOS 6 in IPOD 2nd

    Please Help Me,
    How to update iOS 6 in IPod 2nd generation , i cant any app download

    You do not. The hardware in the 2G does not support higher than 4.2.1
    To more easily find compatible apps:
    iOSSearch - search the iTunes store for compatible apps.
    Apple Club - filter apps by iOS version.
    Starting when iOS 7 was released, Apple now allows downloading the last compatible version of some apps (iOS 4.2.1 and later only)
    App Store: Downloading Older Versions of Apps on iOS - Apple Club
    App Store: Install the latest compatible version of an app
    You first have to download the non-compatible version on your computer. Then when you try to purchase the version on your iPod you will be offered a compatible version if one exists.

  • How to update session.xml file

    any body have an idea about how to update the session.xml file using Toplink workbench Editor.
    I have an Jar file which contains the session.xml file , so i am trying to update the session.xml file with me database details.

    any body have an idea about how to update the
    session.xml file using Toplink workbench Editor.
    For 10.1.3, see "Sessions Configurations and the sessions.xml File" in the TopLink Developer's Guide: http://www.oracle.com/technology/products/ias/toplink/doc/10131/main/_html/sesun002.htm#CACIGEBC
    For 10.1.2, see "OracleAS TopLink Sessions Editor" in the TopLink Mapping Workbench Guide: http://download.oracle.com/docs/cd/B14099_16/web.1012/b15900/tscedit.htm

  • Updating a JAR that uses packages

    Hi There,
    I have a problem in that I am trying to update a class within a JAR which uses packages. The issue is that when updating the JAR, the class I have requested to update is simply placed in the root of the JAR and not in the required package.
    I need to to this within a Java program, so unpacking and re-packing the JAR is not an option.
    Here is what i've been trying:
    I have a class called UserProfile.class, which resides within my messages package - Structure: /messages/UserProfile.class
    When I call the update command:
    jar uf C:\AdminUI.jar E:\project\code\Eclipse_Proj\messages\UserProfile.class
    It creates the folder structure /project/code/Eclipse_Proj/messages within the JAR file and places UserProfile.class within this folder - when in fact the UserProfile.class should be placed within the /messages folder.
    Any ideas on how I can place the class in the correct folder would be much appreciated.
    Thanks very much
    K
    null

    Thanks for the reply!
    Yeah that works, but i'm trying to update the JAR from a Java program using
    Runtime.getRuntime().exec()
    but when I try to run the command Runtime.getRuntime().exec("cd c:") I get the below exception:
    java.io.IOException: CreateProcess: cd c: error=2
    I understand there is a -C parameter to temporarily change directory so I tried the following command:
    jar uf C:\AdminUI.jar -C E:\project\code\Eclipse_Proj \messages\UserProfile.class
    But this simply inserts the UserProfile.class into a jar under the following directory structure:
    project/code/Eclipse_Proj/messages/UserProfile.class
    Thanks again for your help.
    Any input much appreciated
    K

  • How to update vbak,vbap in MV45AFZZ

    DATA:  lw_WZEIT TYPE marc-WZEIT,
                lw_date  type sy-datum.
    LOOP at XVBAP where PSTYV = 'ZRET'.
    SELECT single WZEIT
             into lw_WZEIT
             from marc
            where matnr = xvbap-matnr.
    IF sy-subrc = 0.
        lw_date = lw_WZEIT + sy-datum.
       if vbak-VDATU < lw_date.
         move 'Z1' to xvbak-LIFSK.
          move 'A' to xvbap-ABGRU .
       endif.
    ENDIF.
    ENDLOOP.
        how to update vbak vbap table in MV45AFZZ ( while saving va01).
    Thanks
    Suresh

    Hi Suresh,
    It is not recommended to code custom update to table VBAK and VBAP directly in MV45AFZZ ( i don't think that would work either since the lock is taking place ).
    Use the appropriate procedure instead ( that is USEREXIT_SAVE_DOCUMENT and USEREXIT_SAVE_DOCUMENT_PREPARE depend on requirement ) , and
    perform modifications you need to internal table vbak and xvbap. Standard SAP program will then update the database tables for you.
    XVBAK is available through all part of MV45AFZZ since this is defined globally to include non vbak header information.
    Rettung von VBAK Feldern nach AG-Änderung.
    DATA:    BEGIN OF XVBAK.
            INCLUDE STRUCTURE VBAK.
    DATA: AGUPDA LIKE RV02P-AGUPD,
              WEUPDA LIKE RV02P-WEUPD,
              AUARTUPDA,
              END OF XVBAK.
    Rgds,
    Tuwuh Sih Winedya

Maybe you are looking for

  • How do I sync my email on my iphone/ipad and mac so I don't have to "Read" emails in 2 places?

    My iphone and ipad are synced so when I read an email on one of the devices, it is marked as read, but I just got a new iMac and it will not mark the emails I've read on my iphone/ipad as read. How do I fix this?

  • Layers won't collapse or open

    Illustrator running very slowly, problem with layers. Nothing happens when clicking on triangles to open and collapse layers. Can turn them on and off by clicking the eye. Can also create new layers and delete things. What should I do? Working in win

  • Updating values in a Grid template

    I'm using xMII 11.5 SP3.  Can values displayed in a grid template be edited directly in the template?  We have an application where we'd like to pull values out of a SQL Server table, display them in a grid and have the user update the numbers then p

  • Is there a way to not allow add ons?

    Is there a way to keep users from installing addons to forefox? there are some addons which would be a security issue for my company.

  • StarOffice 8 word spacing for paragraph line fitting

    How do I ensure that each line in a paragraph will end near the right boundary of the paragraph? In other words, how do I make the spacing between words and characters adjust dynamically to ensure the line ends in the same place?