JavaDb question

All:
Does a embedded database allow for the database to exist on a network and users connecting from the java application or is a client//server required.

All:
Does a embedded database allow for the database to
exist on a network and users connecting from the
java application or is a client//server required.You can access the database both from the embedding application (using the embedded driver) and through a network (using the client driver) by using a so-called "embedded server" setup.
See http://db.apache.org/derby/papers/DerbyTut/ns_intro.html#Embedded+Server and the Apache Derby manuals for details.

Similar Messages

  • [JavaDB] Best practices for installation

    Hello,
    this topic is related to java DB, but is not a JDBC problem, so I deem that {forum:id=1050} was not the best fit; I post it to this more general forum, on the grounds that it's a deployment question regarding a standard JDK component.
    We (are only starting to) develop a JavaSE application that will require a local database, using the embedded JavaDB as featured in the JDK 6 installation.
    I wonder how we can design the installation of the application's database in the user environment.
    Here is my current understanding of JavaDB, along with the installation techniques i imagine. Can you suggest pro/cons of each, or suggest another way?
    My understanding:*
    - Java DB is an in-memory DB, which persist its data in proprietary files. It can be used embedded (in the application's JVM), or as a DB server (in a dedicated server JVM), in my case there is a single process that needs persistence, and I have no requirement that suggest to have a DB process alive on its own, so the embedded mode makes most sense.
    Among the "persistence" proprietary files, there are two types of files, the ones that hold the actual data, and "control files" (checkpoints, transaction logs,...). For a stable base (when all traffic is over, all data is in data files.
    My needs*
    After being installed on a customer's PC, the system will consist of a Java application featured as a (collection of) jar file(s), and a JavaDB structured with a schema, and (optionally) populated with default data.
    Installation Strategies*
    I see 4 strategies:
    1) Archive the appropriate persistence files tree from the build/test environment, and unzip it on the customer's machine.
    2) Implement Java code in the application installer, that creates a DB and creates the schema, issuing the relevant DDL SQL statements for the schema and DML statements for its default population.
    3) Implement Java code in the application itself, that at startup, tests whether the DB exists, and if not creates and populates it as in approach 2.
    4) Design application code (probably only entity and DAO classes) that leverages whatever "magic" JPA machinery that automatically creates the mapped DB structures when initialization code "persists" default values the first time: a while ago my team used that in a Glassfish+MySQL prototype, but I don't know if it's a JPA or a Glassfish feature, and I don't know how solid this approach is, especially how it deals with upgrades, when the DB may already exist.
    Note that the rate of changes in the DB structure when the application is upgraded may be a factor: if it helps I can consider it non-existent (and accept that DB upgrades require offline scripts that migrate the DB first, before installing the software).
    Thanks for your help.
    J.

    jduprez wrote:
    Hello, and thank you for replying.
    jschell wrote:
    For MS Access installs I used to (...)I'm not sure I understand (but then, I don't know Access at all). Do I read correctly that it was a matter of copying/renaming the DB's "data" file?
    Obviously when the DBMS supports that it's a very handy.The database didn't support it. On the other hand java.io.* does.
    The problem is that I'm not sure whether the data files can be moved without side-effect (if they include cross-references as absolute path, or host name, whatever). I'm not aware, for example, that Oracle or PostGreSQL can be moved that way, their respective manuals merely recommend to use a "portable dump" format (e.g. Oracle exp/imp).JavaDB is not either of those.
    >
    The advantage is that it is easy to start over if one needs to by doing nothing more than deleting the real file.Yes, quite handy for remote support! :o)
    Similarly (but again, only if I understood correctly), replacing the data file would be enough to force a known "starting state" (very handy for a test platform, for example, or for a customer's staging area).Yes.
    >
    An installer for the above process is only meaningful if it is going to do something dynamic with the database at install time. Like creating customer specific one time configuration records.Good point. But my organization has in-house standards of install scripts, and the integrators will frown at manual file delete/renaming, so I will have an installer script anyway (the simplest, the better). I'm just verifying whether the existing standards are applicable and relevant for this app's architecture.Nothing manual about it, again java.io.*.

  • JavaDB / Apache Derby equivalent to the SQL Server IsNull and Oracle nvl

    Firstly, if questions for JavaDB are supposted to go somewhere else, sorry for posting in the JDBC section, but I couldn't find a specific section for it.
    I'm trying to add support for Apache Derby to a piece of software that already has support for Oracle, SQL Server and MySQL. There is a lot of DB specific coding involved to get the best performance possible. Several of these queries involve checking to see if a nested query returns a value and substituting 0 if no rows are returned.
    In Oracle the function is called: nvl
    In SQL Server the function is called: IsNull
    In MySQL the function is called: IfNull
    I can't find an equivalent for Derby. Does one exist?

    NULLIF
    http://db.apache.org/derby/docs/10.2/ref/rrefcasenullif.html

  • Vista 'bug' with javadb

    Hi
    This isn't so much a question as a highlighting of a problem caused by Vista when using a java application that stores and retrieves data from the javadb.
    I have such an application and discovered that any attempts at overwriting the old javadb database with a new one never succeeded, the old data remained. This was in spite of uninstalling my whole application (including the javadb database) and re-installing.
    The solution was to turn off the 'User Account Control' and hey presto, the new database and data was available to the application.
    However by simply turning the 'User Account Control' back on then the old data re-appeared !!!
    In other words, the system seems to be storing two copies of the database, the original and the new one.
    I haven't yet worked out how to remove the old database and keep the 'User Account Control' on.
    If anyone else has come across this problem I would appreciate some input.
    Regards
    GB

    Not really a bug but a feature.
    Probably because your DB is stored in a UAC protected folder (ex. Program Files) so a non-admin user cannot really modify the contents but UAC provides a virtual view to keep a compatibility with non-UAC compliant application.
    [http://technet.microsoft.com/en-us/library/cc709628.aspx]
    Windows Vista includes file and registry virtualization technology for applications that are not UAC compliant.
    Virtualization ensures that even applications that are not UAC compliant will be compatible with Windows Vista.
    When a non-UAC-compliant administrative application attempts to write to a protected directory, such as
    Program Files, UAC gives the application its own virtualized view of the resource it is attempting to change,
    using a copy-on-write strategy. The virtualized copy is maintained under the user's profile. As a result, a
    separate copy of the virtualized file is created for each user that runs the non-compliant application.
    So if your DB is stored in
    C:\Program Files\<application>\dbVista UAC will create the virtual location
    C:\Users\\AppData\Local\VirtualStore\Program Files\<application>\db The application still use
    C:\Program Files\<application>\db but on the disk the data will be written into the virtual folder.
    Bye.
    RG.

  • Deploying an app with JavaDB

    Hi there,
    Ive gone through a tutorial on using JavaDB/Derby and ive been able to install JavaDB and create a basic app that uses a db. My question, is how do you deploy the app onto computers that dont have JavaDB? I know it will uses embedded JavaDB but how exactly do I do that on a computer that doesn't have it installed?
    I cant seem to find any tutorials covering that. The only ones ive found show examples where JavaDB is installed. I thought the point of embedding it was that you could distribute your app standalone?
    Thanks.

    RisseN wrote:
    Hi,
    So just to make sure I understand you correctly, I will have to package the JavaDB/Derby installer with my application?Thought I made it clear, JavaDB is not the same as Derby.
    You can't install JavaDB - it is part of the Sun 1.6.
    So if and only if you use Derby then you can either put it in your installer or make it a requirement for your installer.
    So if and only if you use JavaDB then you can either put 1.6 in your installer or make it a requirement for your installer.
    >
    When I installed JavaDB on my machine, I had to set the DERBY_INSTALL variable and set embedded mode by setting the classpath. Now how does all of that get done if im distributing my app to users who just want to click on an install button and then be ready to use the app? I dont want them having to do all of that.Installation questions are based on what you are using for an installer. And they don't need to be specific to the rest of your question.
    But if you install something then you must install it completely such that your application will use it correctly. Or provide the user with manual instructions on how to do that themselves.

  • Query a web site javadb

    Hi
    Apologies for the basic nature of this question but I'm looking for a bit of inspiration.
    I am trying to work out the best way to check the uniqueness (of a user input to a web page) against records held in a javadb table located in the same web site directory. Put simply, if a user enters say the the word 'pass' then I would like to query the table to see if it already exists. If it did then I will display a message to the user.
    I would like to create a java class that will do this but the only web site resource at my disposal is the cgi_bin directory. I am sure that I can invoke the java class from a cgi script but how to return the query results from the class has me stumped.
    Any advice on this would be greatly appreciated.
    Many Thanks
    GB

    The most expedient method is to communicate with a java servlet from the CGI via HTTP (i can't imagine why you wish to use CGI for one part of the site and java for the other).
    The HttpServlet class is designed to communicate via HTTP. The servlet can keep DB connections open (CGI is notorious for difficulty in implementing this) then take HTTP reuests then respond appropriately.
    Or just cut out the CGI - why do you need to use it, get the user to query the servlet. Or more crucially, if you are confined to CGIs, how is the java programme going to run? Am I missing the point here?

  • Javafx, binary images and javadb

    Hi guys,
    hope everything is going well on everyone's end.
    My question is this: can I connect to a table in a javadb database to retrieve and display binary images in my application?
    I am attempting to create a card game and I've already stored a few binary images in my javadb, but I'm having trouble gaining access to those files while using javafx (business app). I can call the images normally through an image component, however, I would love to incorporate the visual transitions to my game and so I inquire...
    Thanks for any and all help,
    Silkmane

    Sure,
    I just thought it be a whole lot easier to write queries against my database if the said images were stored and called in that manner. I could write indexes against a respective table and speed up the whole displaying process.

  • Questions on Print Quote report

    Hi,
    I'm fairly new to Oracle Quoting and trying to get familiar with it. I have a few questions and would appreciate if anyone answers them
    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    Thanks and Appreciate your patience
    -PC

    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    I think I posted it in one of the threads2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    Yes, your understanding is correct.3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    No, there is no conc program getting called, you can directly call a report in a browser window, Oracle reports server will execute the report and send the HTTP response to the browser.4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    This is detailed in many threads.Thanks
    Tapash

  • Satellite P300D-10v - Question about warranty

    HI EVERYBODY
    I have these overheating problems with my laptop Satellite P300D-10v.
    I did everything I could do to fix it without any success..
    I get the latest update of the bios from Toshiba. I cleaned my lap with compressed air first and then disassembled it all and cleaned it better.(it was really clean insight though...)
    BUT unfortunately the problem still exists...
    So i made a research on the internet and I found out that most of Toshiba owners have the same exactly problem with their laptop.
    Well i guess this is a Toshiba bug for many years now.
    Its a really nice lap, cool sound (the best in laptop ever) BUT......
    So I wanted to make a question. As i am still under warranty, can i return this laptop and get my money back or change it with a different one????
    If any body knows PLS let me know.
    chears
    Thanks in advance

    Hi
    I have already found you other threads.
    Regarding the warranty question;
    If there is something wrong with the hardware then the ASP in your country should be able to help you.
    The warranty should cover every reparation or replacement.
    But I read that you have disasembled the laptop at your own hand... hmmm if you have disasembled the notebook then your warrany is not valid anymore :(
    I think this should be clear for you that you can lose the warrany if you disasemble the laptop!
    By the way: you have to speak with the notebook dealer where you have purchased this notebook if you want to return the notebook
    The Toshiba ASP can repair and fix the notebook but you will not get money from ASP.
    Greets

  • Question regarding NULL and forms

    Hi all, i have a survey that im working on that will be sent via email.
    I'm having an issue though. if i have a multiple choice question, and the user only selects one of the choices, all the unselected choices return as NULL. is there a way i can filter out anytihng that says "NULL" so it only shows the selected options?
    thanks.
    here is the page that retrieves all the data. thanks
    <body>
    <p>1) Is this your first visit to xxxxxxx? <b><%=request.getParameter("stepone") %></b>
    </p>
    <p> </p>
    <p>2) How did You Learn About xxxxxxx?</p>
    <p><b><%=request.getParameter("steptwoOne") %></b>
      <br>
        <b><%=request.getParameter("steptwoTwo") %></b>
      <br>
        <b><%=request.getParameter("steptwoThree") %></b>
      <br>
        <b><%=request.getParameter("steptwoFour") %></b>
      <br>
        <b><%=request.getParameter("steptwoOther") %></b>
    </p>
    <p> </p>
    <p>3) What was your main reason for visiting xxxxx?</p>
    <p><b><%=request.getParameter("stepthreeOne") %></b>
        <br>
          <b><%=request.getParameter("stepthreeTwo") %></b>
        <br>
          <b><%=request.getParameter("stepthreeThree") %></b>
        <br>
          <b><%=request.getParameter("stepthreeFour") %></b>
        <br>
          <b><%=request.getParameter("stepthreeOther") %></b>
    </p>
    <p>4) did you find the information you were looking for on this site?</p>
    <p><b><%=request.getParameter("stepfour") %>
    <br>
    <b><%=request.getParameter("stepfourOther") %></b>
    </b></p>
    <p>5) Do you plan on using this website in the future?</p>
    <p><b><%=request.getParameter("stepfive") %></b></p>
    <p>6) What is your gender</p>
    <p><b><%=request.getParameter("stepsix") %></b></p>
    <p>7) What is your age group</p>
    <p><b><%=request.getParameter("stepseven") %></b></p>
    8) Would you like to take a moment and tell us how we can improve your experience on xxxxxxxxxx?
    <p><b><%=request.getParameter("stepeightFeedback") %></b></p>

    i was messing around and came up with this. it doesnt remove the null, but if it is null it adds ABC beside it. so i think i might be getting close. i just need to figure out how to replace the null.
    code]
    <b><%=request.getParameter("steptwoFour") %></b>
         <% if (request.getParameter("steptwoFour") == null ) {
         %>
         <% out.print("abc"); %>
         <% }
         %>

  • Anyone know how to remove Overdrive books from my iphone that have been transferred from my computer? They do not show up on itunes. I see a lot of answers to this question but they all are based on being able to see the books in iTunes.

    How do I remove Overdrive books from the library that were downloaded onto my computer then transferred to my iphone? The problem is that they do not show up in iTunes.
    I see this question asked a lot when I google, but they always give answers that assumes you can find the books in iTunes either under the books tab, or the audio books tab or in the music. They do not show up anywhere for me. They do not remove from the app like the ones I downloaded directly onto my iphone.the related archived article does not answer it either.  I even asked a guy working at an apple store and he could not help either.   Anybody...?
    Thanks!

    there is an app called daisydisk on mac app store which will help you see exactly where the memory is focused and consumed try using that app and see which folders are using more memory

  • Basic question

    Hello, i have a basic question. if i have defined 2 fields in a cube or a dso:
    Name Quantity
    and from the external flat file i get some characters for my quantity field. would my load fail?  for standard dso and for write optimized?
    NOTE: quantity field is a keyfigure defined as numeric.
    and the load coming in has "VIKPATEL" for Quantity field and not numbers.
    thanks

    Hi Vik,
    Yes, the load will fail.
    May be you coud first load this data into BW (into PSA) and set both fields as characters fields. Then you can create DSO, do transformation from this PSA to the DSO, and put your logic as to what do you want to do with those Quantity that is not number (e.g. convert to 0, or 'Not assgined', etc).
    You can use transfer rule, or a clean up ABAP code in the start routine.
    Hope this helps.

  • Mid 2010 15" i5 Battery Calibration Questions

    Hi, I have a mid 2010 15" MacBook Pro 2.4GHz i5.
    Question 1: I didn't calibrate my battery when I first got my MacBook Pro (it didn't say in the manual that I had to). I've had it for about a month and am doing a calibration today, is that okay? I hope I haven't damaged my battery? The calibration is only to help the battery meter provide an accurate reading of how much life it has remaining, right?
    Question 2: After reading Apple's calibration guide, I decided to set the MacBook Pro to never go to sleep (in Energy Saver System Preference) and leave it on overnight so it would run out of power and go to sleep, then I'd leave it in that state for at least 5 hours before charging it. When I woke up, the light on the front wasn't illuminated. It usually pulsates when in Sleep. Expectedly, it wouldn't wake when pressing buttons on the keyboard. So, what's happened? Is this Safe Sleep? I didn't see any "Your Mac is on reserve battery and will shut down" dialogues or anything similar, as I was asleep! I've left it in this state while I'm at work and will charge it this afternoon. Was my described method okay for calibration or should I have done something different?
    Question 3: Does it matter how quickly you drain your battery when doing a calibration? i.e is it okay to drain it quickly (by running HD video, Photo Booth with effects etc) or slowly (by leaving it idle or running light apps)?
    Thanks.
    Message was edited by: Fresh J

    Fresh J:
    A1. You're fine calibrating the battery now. You might have gotten more accurate readings during the first month if you'd done it sooner, but no harm has been done.
    A2. Your machine has NOT shut down; it has done exactly what it was supposed to do. When the power became critically low, it first wrote the contents of RAM to the hard drive, then went to sleep. When the battery was completely drained some time later, the MBP went into hibernation and the slepp light stopped pulsing and turned off. In that state the machine was using no power at all, but the contents of your RAM were still saved. Once the AC adapter was connected, a press of the power button would cause those contents to be reloaded, and the machine would pick up again exactly where you left off. It is not necessary to wait for the battery to be fully charged before using the machine on AC power, but do leave the AC adapter connected for at least two hours after the battery is fully charged. Nothing that you say you've done was wrong, and nothing that you say has happened was wrong.
    A3. No, it does not matter.

  • Jabber/WebEx Connect SSO Questions

    I've got a few questions around exactly what needs to be done to get SAML working for our Connect accounts to successfully authenticate from Jabber for Windows, Mac, iPhone, and Android.
    We have both a Meeting Center and Connect account under WebEx using Loose Coupled Integration. Just this past week I enabled SAML for our Meeting Center accounts which went off without a hitch with the exception of Meeting Center integration with Jabber, which is now broken with a message about SSO enabled Meeting Sites not being supported (I think this would maybe be fixed if we had Tight Coupled Integration with our two account?).
    Anyway, my questions are...
    For Windows, I understand all clients will need to be reinstalled with the MSI argument for the SSO_ORG_DOMAIN switch I've read about, is that correct? Are there any other switches needed for the reinstall? 
    How will this work with the Mac and mobile clients? There's obviously no command line options to specify for the installations here, will they just know to kick over to my IdP for authentication once they see an email address that falls under an org with SSO enabled? If so, why does the Windows client need to be completely reinstalled and not just know to find the IdP from the Cloud Connect service like Meeting Center does with the Productivity Tools?
    We're just doing this for our Connect Web IM accounts, not attempting any sort of SSO with the phone accounts/UC integration yet.
    Any ideas on getting the Meeting Center integration into Jabber working again?

    I'd suggest posting your question over on the Jabber Pilot forum, as this forum is specific to Jabber Guest questions:
    https://supportforums.cisco.com/community/4551/jabber-pilot-support
    -jim

  • My iPad wont let me download apps bc security questions, but when I try to make them it freezes

    Every time I try to download an app it tells me I need to update my security questions, but once I click to make the questions the box goes white. So I'm not sure how to fix it

    The new questions show on your account on http://appleid.apple.com ? If they do then try logging out and back into your account on your phone (assuming that is where you are trying to purchase from) and see if the new questions then show on it.

Maybe you are looking for