What is persistence?  How does it work?

Hi,
I'm a total noob. I've been reading and following examples from books but I haven't read anything about how persistence really works? How does it help my session beans to access or make transactions to the database? How does it actually work? What if I just make direct queries from my session beans without the help of the EntityManager or the Peristence API? What's the difference?
Like this for example:
Customer requestCustomer = em.find(Customer.class.customerId);Does it mean that the Persistence API keeps the object alive in the Customer Entity? For how long? Until the application is closed? If so, what happens if the user opens the application again and looks for that object?
Why can't I just make a direct query to see if that customerId exists in the database?
I hope you guys don't mind my questions... I just really want to learn this stuff and I gotta let things out of my head. Hope you can help. Thanks!

morphian wrote:
Hi,
I'm a total noob. I've been reading and following examples from books but I haven't read anything about how persistence really works? How does it help my session beans to access or make transactions to the database?
How does it actually work? What if I just make direct queries from my session beans without the help of the EntityManager or the Peristence API? What's the difference?
You have to code the stuff that EntityManager and Persistence are doing for you.
Like this for example:
Customer requestCustomer = em.find(Customer.class.customerId);Does it mean that the Persistence API keeps the object alive in the Customer Entity? For how long? Until the application is closed? Complicated. Not enough info.
If so, what happens if the user opens the application again and looks for that object?
Open the app and the object will be refreshed from that data store. Hence the word "persistent".
Why can't I just make a direct query to see if that customerId exists in the database?
You can.
I hope you guys don't mind my questions... I just really want to learn this stuff and I gotta let things out of my head. Hope you can help. Thanks!This isn't the way to do it, but it's a start.
%

Similar Messages

  • My iPhone was stolen and I have contacted the police who are using the meid number to locate.  How does this work and what are my chances of getting the phone back?

    My iPhone was stolen.  I used Find My iPhone app to lock it and display a message.  The phone has not connected to the internet to locate it.  I contacted the police and they have taken my meid number.  How does this work and what are my chances of getting the phone back?  Are there other ways the theif can use it.  I was told once they put in a new sim card and use it, whatever software the police have, it will show up.

    Honestly? In the US (I can't speak to other countries, though I doubt it works much differently in a lot of the world) The police took your report and filed it either in their computers or, on paper. They will now not think of this again. The only time it will cross anyones mind is if, in the course of entering information into evidence about items recovered or seized at a crime scene, the serial number of an iPhone that was found/seized happens to match yours, in which case you will be contacted.
    The police in the US can and will do nothing to 'blok' the phone and it's not worth their time to try and locate it unless you know for a fact that it was stolen by a big time drug lord, master criminal, or some other such prime target and they can get a court order to track the location of the phone in order to locate this individual for your own purposes.  If they do that, they'll probably keep him under surveilance for a year or so before they act.
    Basically, the police don't care about your phone. If they find it, they will give it back to you. They are not, however, going to go looking for it. They have better things to do.
    I'm sorry, but that's the way it is.

  • What is UMA exactly? How does it work?

    What is UMA exactly? How does it work?
    I have T Mobile but am not subscribed to Hotspots at Home.  I do pay for the BB unlimited internet package.
    When I am connected to my router at home, it goes to UMA.  But other times, it just says wifi and is still connected to my router -- but NO UMA.  I haven't made any changes.
    What is this?

    Here is a KB that discusses UMA:
    http://www.blackberry.com/btsc/microsites/search.do?cmd=displayKC&docType=kc&externalId=KB11735&slic...
    Hope that helps!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Menu Object; MANUAL option. What is this, and how does it work?

    What is this... and, how does it work? Can't find documentation on this.

    My knee-jerk reaction is, "are f'n kidding me?"... but, of course, you're not.
    I must say, that is an incredibly useless option. How would that 'option" differ from simply making a text object (or text/rectangle/image combo or group) and creating a link?
    What got me looking at this option was the hope to find some way to insert a dynamic "field" that could be used on a master page to display the current page title (of a page based on that master). Something similar to Word (and other applications) that you can enter information into a document property and then insert that information anywhere within the document by using a field code for that info. I don't know if there is an HTML code that could be used to accomplish this, in this case. Something that would refer to the page title.
    Thanks for the info none-the-less.

  • What is "Assisted GPS" on the iPad and how does it work?

    What is "Assisted GPS" on the iPad and how does it work?

    I purchased the iPad mini Wi-Fi & Cell because it has GPS. OK, it is assisted GPS but the GPS works very well as stand alone. I got the iPad mini for use in flight, so I dont even have a sim card in it. The GPS works perfectly in flight under all conditions. I have cross checked it against typical approved aircraft installations and it is very accurate at all times. I use it in Wi-Fi mode on the ground when updating my aviation database, when planning a flight, or similar circumstances. The primary advantage of A-GPS is quick location reading when first turned on, when on the ground where the GPS satellites signal may be of reduced quality. At 10,000 feet plus, it is a stand alone GPS. I have frequently turned the iPad off in flight for periods of time and when powering up, it gave me accurate positioning in a few seconds, never exceeded 10 seconds. I have also tested my iPad on the ground, using the aviation maps, and the GPS works perfectly also.
    It remains possible that there is some feature that enhances the GPS when on the ground, even if there is no sim card in the iPad. But I doubt that any of these would work in an aircraft at high altutide. Nonetheless, I would appreciate knowing more about this.

  • What is 'mobile account' and how does it work?

    This is a hidden feature in Mac OS Leopard, that I believe require an Leopard Server on the network.
    I have not found it in the regular user interface, but it can be revealed by following the below process:
    1. Go to System Preferences > Accounts
    2. Unlock
    3. Search for mobile account, and press Enter
    4. Wait for the Mobile account options to show up
    What is this feature? How does it work?
    I have found no references to it in the normal documentation.

    Google is your friend:
    "A mobile account is a Mac OS X Server user account that has been copied to a local computer and remains synchronized with the server account so that both locations contain a matching set of data."(Mac OS X Server User Management, p. 46).
    And it has been around since 10.3, so it is not something new to Leopard.
    see: http://www.afp548.com/articles/Panther/mcx2.html

  • What is Bootstrapping in LYNC ? how does it work?

    could anyone explain..whats bootstrapping in LYNC? how does that work? what is it used for.??

    bootstrapper.exe is called by setup.exe, bootsrapper.exe is responsible for deployment and configuration of server roles.
    The bootsrapper receive the configuration from the configuration of the topology builder
    regards Holger Technical Specialist UC

  • What is iTunes Match and how does it work?

    What is iTunes Match and how does it work? I have several tunes on my computer that do not show complete. The source of these tunes are from my own CDs.

    iTunes match - http://www.apple.com/itunes/itunes-match/ - see FAQ at end too
    Basically it looks at the music you have in iTunes.  If it sees the equivalent on the iTunes Store site it does nothing, but it makes that copy accessible to you to download.  If you have music  it doesn't it will upload a version from your computer to the site that only you can access from anywhere online.
    In your case if you have incomplete tracks it will not fix them.  It does some kind of audio fingerprinting to make sure you aren't just feeding it a bunch of 60s demonstration cuts and trying to get whole tracks back.

  • What is a content management system how does it work in coldfusion?

    hi again
    help?
    what is a content management system how does it work in
    coldfusion?
    snippets?
    examples in Coldfusion?
    thanks

    Googleing "content management" brings up 120 million hits.
    Good place to start.

  • What is the "Data Transfer Process" in the BI7.0, and how does it work?

    Hi, experts !
    I'm fresh on BI7.0.
    What is the "Data Transfer Process" in the BI7.0, and how does it work?
    And what is it used for ?
    Could anyone help me? Plz send me some doc.
    [email protected]
    Thank u !

    HI,
    Refer this blog
    /people/community.user/blog/2007/06/22/sap-netweaver-70-bi-data-transfer-process-dtp-blog-series
    Also refer
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/f98e07cc483255e10000000a1553f7/frameset.htm
    Thanks

  • What does the bookmark bar do? How does it work?

    What does the bookmark bar do? How does it work?

    You can use the bookmarks bar in Safari to have links to some sites permanently shown at the top of the screen below the address field and icons - so you just have to tap the link on the bar to go to that site as opposed to tapping the bookmarks icon and finding the link in there. So it's just a slightly quicker way to go some of your more regularly used sites

  • How does QoS work with WAAS WCCP? What's the interaction between QoS Traffic Classification and WAE Traffic Application Policy?

    How does QoS work with WAAS WCCP? What's the interaction between Router QoS Traffic Classification and WAE Traffic Application Policy?

    By default, WAAS preserves the DSCP marking on intercepted packets.  There is a configuration option to set/override the DSCP value at the global (device), application, and classifier levels.  Currently WAAS provides marking only.  There is no action taken by WAAS based on the DSCP value.
    Regards,
    Zach

  • What is efax and how does it work?

    Hi!
    eFax® is a service provided by eFax®, not Hewlett-Packard, that allows you to send and receive faxes using the Internet rather than a phone line. eFax® is easy to use, but it is different than a typical phone-based fax machine. You don't require a phone line to use it, so you don't have to worry about busy signals and you can place your printer where you want it, not where the phone jacks are located! The fax number you are provided will not typically be a local number, and may even be in a different country. You will receive 20 incoming and 20 outgoing fax pages per month for free with this service. Your page counts will reset at midnight Pacific Time on the first of each month. You can also subscribe to eFax® Plus to obtain additional pages per month by visiting: http://www.eFax.com/products/internet-fax.
    How does it work?
    eFax® uses the printer Internet connection to send and receive faxes. When you send a fax, it is sent over the Internet to the eFax® server and then eFax® sends your fax to the recipient's fax machine over a standard phone line.
    Your faxes are received in a similar manner, but the order is reversed. The sender sends the fax over a phone line to eFax® and then eFax® sends the fax to your printer using HP's ePrint service.
    This question was solved.
    View Solution.

    Hi Im_cheesecake,
    Great information, if you don't mind I just wanted to piggy back off of your post, to clear any potential confusion.
    The 20 free incoming & 20 free outgoing faxes are with HP printer's that include the eFax service print app.  As of now, we have three printer series' that include the pre-installed eFax print app: HP Photosmart 7510 Series, HP Envy 110 Series, and the HP Photosmart eStation C510a.  
    eFax also has a free plan which allows you to receive a limited number of faxes but does not allow you to send any faxes. If you exceed the number of received faxes allowed, eFax will prompt you to upgrade to a paying account. Here are the main details of the free plan:
    One remote (i.e. non-local) eFax number
    Area code/prefix is selected by eFax and cannot be changed (unless you upgrade to a paid account)
    20 incoming fax pages per month (receive-only)
    You are prompted to upgrade to a paying account if you exceed 20 incoming pages, or if you need send capability.
    Say "Thanks" by clicking the blue Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"; therefore, it's easier for others to find.
    I am an HP employee.

  • JDBC Adapter:- How does it work??

    Dear Friends,
    I would like to know the nuts and bolts of JDBC adapter.
    1.)How does it work internally?Internally what does sap use?
    2.)In my scenario i just need to access a sap table so Can i write my Java JDBC program to access it.?
    3.)Is there any other way to sent data from Idocs to map to a external database with out using XI.?
    thx,
    jeevan

    Hi Jeevan,
    As far as the JDBC adapter goes, internally it uses, obviously JDBC (Java DataBase Connectivity). Thus all the calls from this adapter are internally SQL Queries (Either Select, Insert, Update, Delete, Execute Stored Procedure) that are sent using Java JDBC API.
    In Sender Configuration, it needs a Select and an Update query to be configured into it. It polls the External Database at specific intervals (Polling Interval in the Channel Configuration),i.e., it connects to the Database via a JDBC Connection and runs the select query. The data from the query is sent to XI as an XML Document. The update query is used to update the DB such that the same data is not picked again in the next poll. This is generally done through a status field. The select query's Where clause should pick records with one status and the update should change all those statuses so that the select does not pick them again. Click [Here|http://help.sap.com/saphelp_nw70/helpdata/EN/22/b4d13b633f7748b4d34f3191529946/frameset.htm|SAP Help on JDBC Sender Adapter] for more details, including the format of the XML file sent.
    In receiver configuration, the channels creates SQL statements from the XML Document it receives. This can be either Select, Insert, Update, Delete or Stored Procedure Call Statements. This requires you to give the receiver channel an XML Document in a pre-defined Schema. Click [Here|http://help.sap.com/saphelp_nw70/helpdata/EN/22/b4d13b633f7748b4d34f3191529946/frameset.htm|SAP Help on JDBC Receiver Adapter] for more details including correct XML Schemas. Note that the kind of SQL Statement generated (Select, Update, etc) is dependent on the schema provided.
    Hope this was helpful!!!
    Thanks,
    Guru

  • Outbound Dialer records to cache. how does it work?????

    Im confused, on the campaign manager one of the settings for the campaigns is
    Records to cache.  The Outbound guide says that this is "the minimum number of dialing numbers
    that each dialer caches for each of your outbound option skill groups.  Default is 100"
    how often does it cache?
    how does this work?
    Lets says I have an agent campaign mode:Predictive_Blended,
    Records to cache: 1, everything else default.
    My Admin script is set to cycle every 1 minute.
    does this mean that 1 record get cached every minute?
    thanks

    Hi
    From what I have seen it is the number of records that the dialer fetches from the database at any given moment. The dialer cahches these records and dials them.  As soon as it exausts then it fetches more.
    Victor

  • Getting my laptop fixed , how does it work?

    I know it may sound really basic but how does it work if I want to get my laptop fixed? Do I just walk into the store and find a random assistant or what?

    You'll want to set up an appointment online before going to the store.  They are typically too busy to see walk-ins within any reasonable period of time:
    http://www.apple.com/retail/geniusbar/
    They'll have a display showing the appointments and your place in line. 

Maybe you are looking for

  • How can I go back to default settings or uninstall completely then re-install-on MAC OS X 10.6.8

    I used to be asked to allow or temporarily allow each site I visited. I am no longer getting these anywhere and prefer going back so I can choose which sites to allow. I also cannot get JavaScript to work--I've enabled it and also tried uninstalling

  • 802.1x System Profile HELP, Please!!!

    Server : Xserve, 10.8.5 Clients : Mix, 10.6.8, 10.8.5 To who ever may be able to help me, I am the tech director for a school district and manage about 800 Apple laptops ranging from old MacBooks to the latest MacBook Pro. We utilize the LDAP service

  • Word 2011 normal.dotm template

    How can this template be modified? I'd like to delete some styles. When the template is opened, it just creates a New Word file.

  • Messages app is missing

    I installed the new operating system Mavericks and my Messages app has a question mark in the dock. I tried to find it in my application folder and looking for it in my finder and had no luck. What can I do? Thanks AF50

  • The best way pass a goemetry to a procedure

    I need to pass a geometry to a stored procedure. I first thought of using the mdo.sys_geometry types but the java client cannot pass in this type of object. I then thought of using pl/sql tables to send in the sdo_element_info array and the sdo_ordin