Multiple applications editing the database unique but JPA will not reflect the changes

Hi all

I have a very bad some problem. I have a database which is access by multiple applications. And in an application (web), I use JPA. Everything worked well until now.

But recently I had to create another application (standalone) that access the same database and do editing/updates to date.

My problem is, these updates does not request for web (JPA). I use a named query to search for files. Even updates are here jpa does not show these updates until I restart the glassfish server.

I tried many suggestions as game cache and nothing has helped me. So I post this question.

My code
// Search operation looks like following
EntityManager entityManager = Persistence.createEntityManagerFactory("ModelPU");
        
EntityTransaction entityTransaction = entityManager.getTransaction();

entityTransaction.begin();
Query queryPatientNotifications = entityManager.createNamedQuery("Course.getAllNotifications");

queryPatientNotifications.setParameter("cId", id);

Course course = (Course) queryPatientNotifications.getResultList().get(0);
            
List<CourseSMSNotification> allNotifications = course.getNotifications();

System.out.println("Not Size :" + allNotifications.size()); // PROBLEM : print 0 even there are records in database
Persistence unit
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="CosmicTBModelPU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>org.cosmic.tb.mode.entity.TBCourse</class>
    <properties>
      <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/DB_TB"/>
      <property name="javax.persistence.jdbc.password" value=""/>
      <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
      <property name="javax.persistence.jdbc.user" value="root"/>
    </properties>
  </persistence-unit>
</persistence>
Can someone help me with this please?

Thank you
~ Pablo

It is a way to much. Toplink/EclipseLink uses a shared cache that exist at the level of the plant described here:
http://wiki.Eclipse.org/EclipseLink/examples/JPA/caching

This is for performance and is optimal when there is only one application to access the data. Depending on how often or the calendar of other applications when making changes, you can disable the shared cache outright, or set the cache to be invalidated at specific times, as appropriate.

Best regards
Chris

Tags: Fusion Middleware

Similar Questions

  • I realized that I had a message to update for a while then when I checked, I found that the app CC was missing. I downloaded and installed the application, but it will not update of software. In the creative cloud Panel, the only options I get are the Hom

    I realized that I had a message to update for a while then when I checked, I found that the app CC was missing. I downloaded and installed the application, but it will not update of software. In the creative cloud Panel, the only options I get are the Home tab to check the activity and the Stock tab. The applications tab is missing. How can I get that back so I can update photoshop and lightroom?

    Please, try the steps mentioned here https://helpx.adobe.com/creative-cloud/kb/apps-panel-reflect-creative-cloud.html

    Let me know if it works!

  • I downloaded bridge in my application, but it will not start when I click the icon

    I downloaded bridge in my application, but it will not start when I click the icon

    Hello

    Did you try to unsintall and reinstall the application?

    Kind regards

    Sheena

  • I use PS extended 6. It works well, but it will not be updated. I'll take a notice in my application creative cloud he has an update waiting. I'll click on the UPDATE button and it works 100% and then give me a update failure message.

    I use PS extended 6. It works well, but it will not be updated. I'll take a notice in my application creative cloud he has an update waiting. I'll click on the UPDATE button and it works 100% and then give me a update failure message.

    I fixed the old-fashioned way. Uninstall - reinstall. Works fine now.

  • I just bought a Windows 7 Edition upgrade Home Premium to professional, but it will not install and told me to get a dfferent key.

    I just bought a Windows 7 Edition upgrade Home Premium to professional, but it will not install and told me to get a dfferent key.

    Windows 7 Anytime Upgrade fails:

    If your getting the following: error: Windows Anytime Upgrade failed
    This problem may occur if Windows 7 SP1 was downloaded by Windows Update, but has not yet been installed.
    See: http://support.microsoft.com/kb/2660811

    = Other reasons and possible corrections.

    Windows Anytime Upgrade fails with the error:
    "every time that the upgrade has failed. Go online to solve the problem.
    http://support.Microsoft.com/kb/2658652

    If Anytime Upgrade still does not work:

    Shut down and restart your computer.

    Make sure that the Windows updates have been installed.

    Download the hotfix that contains a tool called CheckSUR, this tool will look at the package and the maintenance of records and difficulty any data corrupted, the tool is listed under kb947821 he can be found at the following link http://support.microsoft.com/?kbid=947821

    If Anytime Upgrade still does not work, turn off the user account control:

    1. go in user accounts in Control Panel

    2 change user account control settings

    3. pull the slider to the level as low as possible

    4. restart the PC

    5. pass by the "Anytime Upgrade" as usual

    Try the following:

    1 disable any security software before attempting to upgrade

    2. make sure that your computer is updated (devices and applications)

    3. disconnect all external devices before installing.

    4. check your hard disk for errors:

    Click Start

    Type: CMD, according to the results, right-click CMD

    Click on "Run as Administrator"

    At the command prompt, type: chkdsk /f /r

    When you restart your system, your computer will be scanned for errors and will try to correct them.

    1. click on start, type msconfig in the search box and press ENTER.

    User account control permission

    If you are prompted for an administrator password or a confirmation, type the password, or click on continue.

    2. in the general tab, click Selective startup.

    3. under Selective startup, clear the check box load startup items.

    4. click on the Services tab, select the hide all Microsoft Services check box, and then click Disable all.

    5. click on OK.

    6. When you are prompted, click on restart.

    7. after the computer starts, check if the problem is resolved.

    Also run the Windows 7 Upgrade Advisor:

    http://www.Microsoft.com/Windows/Windows-7/Upgrade-Advisor.aspx

    Who should I contact if I have problems installing and / or activation of my product key card?

    Please contact to the: www.windows7.com/getkeysupport.

    If all above fails them, install Windows 7 Service Pack 1, and then try the Express Upgrade:

    Learn how to install Windows 7 Service Pack 1 (SP1)
    http://Windows.Microsoft.com/en-us/Windows7/learn-how-to-install-Windows-7-Service-Pack-1-SP1

    If your key is not valid and you will need to change the keys, you may need to Open regedit and remove first the ProductKey value in the following registry key:
     
    HKCU\Software\Microsoft\Windows\CurrentVersion\WindowsAnytimeUpgrade

  • I've got qcad Professional installed but vista will not open save dxf files. I get dxf is not an application valid win 32. Is there any solution for this?

    I've got qcad Professional installed, but vista will not open save dxf files I get a file... dxf is not an application valid win 32.
    Is this a common problem?
    Is there any solution for this?

    You, of course, took umbrage to my last post. For that I apologize, there was no pejorative intention. I am a newbie in the forums and am digging my way along. I have marked your answers answers by mistake, I'll try to fix this.
    I solved the problem, I tried to open files in the Qcad application by clicking on the list of recently used files. It will not work in a new session.
    The correct procedure is:-
    Open click, Qcad - click file - open (this opens the index page of Qcad from the saved files) - click the required file - click Open.
    There is no problem, with the exception of this incompetence of users.
    Thank you for your time and assistance.

  • Vista Ultimate black screen with the living mouse, pc will only boot in safe mode, downloaded hotfix kb977675-v2 - x 86, but it will not install in safe mode

    have a ultimate black screen vista under contract with living mouse, pc will only boot in safe mode, downloaded hotfix kb977675-v2 - x 86 but it will not install in safe mode

    have you tried the manager used tasks related to bugs

    Msconfig

    Explorer.exe

    and have had no joy... Please heeeeeeeeeeeelllpppppp

    Hello

    It is the fix in case there are any information it helps.

    A computer that is running Windows Vista or Windows Server 2008 stops responding at a black
    screen early in the startup process
    http://support.Microsoft.com/kb/977675

    Microsoft - contact patch Support issues.
    http://support.Microsoft.com/contactus/?ws=support#TAB0

    ======================

    Other troubleshooting methods that can help.

    Why my screen is black when I start Windows 7?
    http://Windows.Microsoft.com/en-us/Windows7/why-is-my-screen-black-when-i-start-Windows-7

    References to Vista also apply to Windows 7.

    No registration necessary data and re - install Windows 7 might be the best option, but here are a
    few others.

    You can save your files by putting the drive in another computer or an external hard drive enclosure, then
    saving them. Do this using several methods to redundantly. Of course, a real computer
    Shop or the manufacturer of your system can help to recover the files.

    --------------------------------------------------------------

    You can access Mode safe? Repeatedly press F8 as you start? If yes you can try Control Panel
    -Double click - Driver tab - click on UPDATE driver - device Manager - map - graph
    then right click on the device and UNINSTALL - REBOOT.

    Another method to try to get to the desktop (try in normal Windows Mode without failure)
    is CTRL + ALT + DEL and the processes tab find EXPLORER.exe and END PROCESS on it.
    then on the tab Applications - lower right - new task - the type in EXPLORER.exe. Safe mode is
    accessible by tapping F8 as you start several times.

    First check this thread in case it is simple and if not to come back to this thread.

    http://social.answers.Microsoft.com/forums/en-us/vistaprograms/thread/50247d5e-0ae0-446c-A1bd-11287fd1478a

    Black screen problems are extremely difficult to repair and all hotfix is usually a hit or miss
    base. That there is no information on a black screen as there is just a blue screen
    adds to the difficulty. Often using a restore point or Startup Repair will have no effect.
    You can try a google to see the proposed repairs, whom some have worked however these
    cover a wide field of efforts.

    Here's a video of one of them.

    http://www.Google.com/search?hl=en&q=black+screen+of+death+Vista&btnG=search&AQ=f&OQ=&AQI=G1

    Here's another fix
    http://blogs.PCMag.com/SecurityWatch/2008/12/the_mysterious_black_screen_of.php

    You have a window 7 disk? You can try restoring the system to it. If you do not have the
    discs, your system manufacturer will sell them at low prices. Or try in safe mode if you can get
    it.

    How to do a system restore in Windows 7
    http://www.SevenForums.com/tutorials/700-system-restore.html

    You can create a recovery disc or someone else use same version (to do the system restore
    It only needs to be bootable).

    How to create a Windows 7 system repair disc
    http://www.SevenForums.com/tutorials/2083-system-repair-disc-create.html

    ------------------------------------------------

    These require the correct Vista discs since you can not start safe mode.

    Try the Startup Repair tool-

    What are the system recovery options in Windows 7?
    http://Windows.Microsoft.com/en-us/Windows7/what-are-the-system-recovery-options-in-Windows-7

    How to start on the System Recovery Options in Windows 7
    http://www.SevenForums.com/tutorials/668-system-recovery-options.html

    Try Repair Options recovery or a Windows 7 boot disk system

    How to run a startup repair in Windows 7
    http://www.SevenForums.com/tutorials/681-startup-repair.html

    -----------------------------------------------

    Here are a few Google searches where many have found different solutions:

    Vista black screen - check that a 1st
    http://www.Google.com/search?hl=en&source=HP&q=Vista+black+screen&AQ=f&OQ=&AQI=G10

    Vista black screen Solution
    http://www.Google.com/search?hl=en&q=Vista+black+screen+solution&AQ=f&OQ=&AQI

    Vista black screen Fix
    http://www.Google.com/search?hl=en&q=Vista+black+screen+fix&AQ=f&OQ=&AQI

    -----------------------------------------------

    If necessary and you can access all ordinary Windows.

    If nothing works, you can do a repair installation.

    How to start on the System Recovery Options in Windows 7
    http://www.SevenForums.com/tutorials/668-system-recovery-options.html

    How to do a repair installation to repair Windows 7
    http://www.SevenForums.com/tutorials/3413-repair-install.html

    ---------------------------------------------------------------------------

    Another method that works sometimes: at the command prompt, type of Vista startup disk:
    (type in a single line or copy / paste a line at a time and then press enter - do not type)
    parenthesis or "BOLD"
    )

    c:

    cd\

    CD c:\Windows\System32\winevt (there is a space between cd and C :)

    Ren LogsOLD Logs (there are spaces between ren and newspapers and Logsold)

    RESTART Windows

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • I bought lightroom 6 at amazon, but it will not be installed. All I said "Installer failed to initialize, please download Adobe install advisor to detect the problem", but it does not exist. It gives me no more information than that. I have already

    I bought lightroom 6 at amazon, but it will not be installed. All I said "Installer failed to initialize, please download Adobe install advisor to detect the problem", but it does not exist. It gives me no more information than that. I already had a free annual subscription to cc through my new canon camera, but I installed for my mac already. No phone number to call, adobe contact to say amazon, what do I do?

    start at the top and work your way down to apply applicable patches until your problem is solved.

    If (win) cc: https://helpx.adobe.com/creative-cloud/kb/creative-cloud-desktop-application-failed.html

    If your error is:

    "Setup failed to initialize. File not found. ' or 'could not initialize installation. This could be due to missing files.

    first of all, rename folder OOBE OOBE.old.

    to find the OOBE:

    Win 64 bit OS: Program Files x86\Common Files\Adobe\OOBE

    Win 32 bit OS: Program Files \Common Files\Adobe\OOBE

    Mac os: HD > library > application support of > adobe > caps

    Mac os: USER > library > application support of > adobe > OOB

    If it fails or isn't the exact error you see, uninstall, clean (http://www.adobe.com/support/contact/cscleanertool.html) and reinstall.

    If you use an installation dvd:

    Copy the contents of the drive in a desktop folder and install from this directory.

    If you are using a mac:

    1. try to create a new user account in Mac with administrator privileges.

    2. connect to the new user, navigate to Mac HD > Application > utilities > Adobe Installer folder, locate products such as Adobe Reader, Adobe Flash, Adobe Air and uninstall the

    3. navigate to the user library > Application Support > Adobe and Adobe put in the trash.

    4. navigate to Mac HD > library > Application Support > Adobe and Adobe put in the trash.

    5 restart the installation.

    If everything is applicable above fails, check your Setup logs:

    http://helpx.Adobe.com/Photoshop-elements/KB/troubleshoot-install-using-logs-elements.html

  • Hoping to change from English into Chinese language. By Edition-preferences-language setting, but it does not work.

    Simplified Chinese WIN 7,64;

    Install acrobat DC;

    but the system installs the English version by default,

    Hoping to change from English into Chinese language.

    By Edition-preferences-language setting, but it does not work.

    Thanks for the help!

    Cloud of swap language http://helpx.adobe.com/creative-cloud/kb/change-installed-language.html

  • try to change the text in a saved file, but it will not allow isolate me the text, place the cursor in the text box or simply go back to remove.

    try to change the text in a saved file, but it will not allow isolate me the text, place the cursor in the text box or simply go back to remove.

    Hello

    in what format save you your file? If it's a jpg file, then the text is compressed and unfortunately PS is telling things as they are. Even if you could change the text before you save, after having been saved in jpg format, the text is merged and is no longer editable.

    A good solution is to save the files as PSD files, photoshop files. In this case, all layers are saved uncompressed and so your text will appear in its own layer in photoshop. All you need to do in this case to change it is the result of a three-step procedure

    (1) select the right layer

    (2) take the text tool in the tools bar

    (3) mark and change your text

    So the crucial question is: in what format you save your file?

  • My computer is Windows Vista and I pay for Photo Shop CS6, but it will not download. Can I download the CS5 and how?

    My computer is Windows Vista and I pay for Photo Shop CS6, but it will not download. Can I download the CS5 and how?

    Photoshop cs5 is designed to:

    Windows XP with SP3

    Windows Vista Home Premium, Business, Ultimate or enterprise with SP 1 (P2 S recommended)

    Windows 7

    Photoshop cs6 is designed to:

    Processor Intel Pentium 4 or AMD Athlon 64

    Windows XP with SP3 or Windows 7 with SP1

    CS6 applications support also Windows 8 and Windows 8.1.

    * Video features are not supported on 32-bit Windows systems.

    * 3D features are disabled and some features of mercury from the improved graphics engine may not work with less than 512 MB of VRAM. Read the Help section.

    If you just buy CS6, you might be able to get a refund, but Adobe sells more software CS5. Is it possible to upgrade your computer to make it compatible? Here are the system requirements for photoshop:

    System requirements | Photoshop

    Guinot

  • I want to save an IMAP via POP3 account in Thunderbird, but it will not download old emails that are still on the server. How can I do this?

    I start using Thunderbird to save and purge old e-mails from an account via POP3. This account is accessible by other users using IMAP on their computers and mobile phones.

    I want to archive and purge old messages from the server using Thunderbird. But it will not download messages that apparently are marked as read on the server via IMAP.

    POP mail accounts must be configured to "leave messages on server".
    Check this box before use.

    • Tools > account settings > server for the e-mail account settings

    or

    • menu icon > Options > account settings > server for the e-mail account settings

    Select: 'leave messages on the server.

    Optional: select: "during the more than xx days" this will remove something more that select the specified number of days "until I have delete" when you delete an email it will be deleted from the server.

    Click Ok to save the settings.

    POP mail accounts are only looking at the Inbox and download everything that has not been previously downloaded regardless of whether it has been read or not. They cannot access or download from any other folder on the server.

    If you want to download the e-mail messages in other directories, you must move the emails in the Inbox to upload and it's may not be practical in your situation.

    What you can do is to synchronize your IMAP folders to a copy downloaded to your IMAP e-mail account.
    Then switch mode 'offline' to stop any additional synchronization synchronized files update.
    MozBackup tool could now be used to save the profile synchronization created mbox files that contain emails.

    You can also do the following to get a copy outside the IMAP e-mail account:
    Create the same folders in the "local folders".
    Then right click on the email and "copy to" and select local folders and the folder you need.
    Put a copy in the local files means these e-mails are also on your computer and they are not influenced by what you do in the IMAP folder.
    You need backup emails in these folders.
    See info:

    MozBackup:

    ImportExporttool:

  • New computer, new Firefox install, but it will not be asked to remember the passwords?

    New computer, Dell XPS 17 laptop computer, Windows 7 64 bit, downloaded the latest Firefox (new v12.0), but he will not be asked to remember the passwords? This is one of the big reasons able to use Firefox, is there something that needs to be defined? Also disgusted that Windows Easy Transfer from your old computer, that would have been copied 'everything' is not copied my Firefox stuff on?

    Here's what I suggest:

    On your old computer, open help > troubleshooting information and then on the button that says either the folder containing (pre 12 Firefox) or view folder (Firefox 12). It's your active profile, and you must copy all the content of this file on a USB flash drive or another your favorite type of media.

    On your new computer, close Firefox and starts in the Profile Manager, as described in the management profiles. Create a new blank profile. After Firefox starts upward in this profile, see help > troubleshooting information > view folder. Leave this window open and restart Firefox.

    Now completely erase this profile folder and dump all of your old profile in folder. Restart Firefox and you should have as close a replica as possible to your old configuration.

    A little luck?

  • I use trusteer for Bank report but it will not support the beta version firefox o 9, suggestions?

    I use trusteer for banking report, but it will not support the beta version of firefox 9, suggestions

    Trusteer informed me that a new version of their report software that is compatible with Firefox 9 is available at http://download.trusteer.com/Gcur4Wtnu/RapportSetup.exe

  • I downloaded the last Adobe Flash - it is said to be successful but will not work. What he says "Manage plugins but the plugin says it is enabled, but it will not work." I have tried disabling and then enabling - without success.

    I downloaded the last Adobe Flash - it is said to be successful but will not work. What he says "Manage plugins but the plugin says it is enabled, but it will not work." I have tried disabling and then enabling - without success. Help, please!

    There are two different versions of Flash. ActiveX for IE version and the version of the Plugin for other browsers. Have you installed the correct version? This forum software is not thing that Flash is installed for Firefox or the Plugin is disabled.

    1. download the file of configuration Flash from here:

    Adobe Flash - Plugin version.

    Save it to your desktop.

    2. close Firefox using file > exit

    Then check the Task Manager > processes tab to make sure that firefox.exe is closed.

    {XP: Ctrl + Alt + Delete, Vista: Shift + Ctrl + ESC process tab =}

    3. then run the Flash configuration from your desktop file.

    4. run Firefox and test your installation here: https://www.adobe.com/software/flash/about/

    • On Vista and Windows 7, you may need to run the installer of plugin as administrator by starting the installation program via the context menu if you do not get a UAC prompt for permission to continue (that is to say that nothing seems to be happening).

    See this:

    http://vistasupport.MVPs.org/run_as_administrator.htm

Maybe you are looking for