Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:14:10+00:00 2026-06-04T22:14:10+00:00

I am having a problem with my Glassfish Web Application: I use a persistence

  • 0

I am having a problem with my Glassfish Web Application:
I use a persistence provider and EJB facedes on my glassfish application. the Mysql connection is configured as a JDBC resource.
The problem is when I update the database locally (using mysql promt or some other client), the glassfish server still “sees” the old values. I realize that there is probably some type of caching somewhere between the glassfis server and the Msyql DB. I am quite sure there is some parameter I can change to fix this, but after searching for quite some time I can’t seem to find it. Can anyone direct me to teh problematic region? the mysql JDBC drive? web.xml? connection pool?

Some technical details:
Database: Mysql 5.1
Server: Glassfish 3.1
Server is connecting to the db with root username
I use EclipseLink as persistence provider on the glassfish application
configuration (sun-resources.xml):

<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="mysql_drivingschool_rootPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
    <property name="serverName" value="localhost"/>
    <property name="portNumber" value="3306"/>
    <property name="databaseName" value="drivingschool"/>
    <property name="User" value="*****"/>
    <property name="Password" value="****"/>
    <property name="URL" value="jdbc:mysql://localhost:3306/******"/>
    <property name="driverClass" value="com.mysql.jdbc.Driver"/>
</jdbc-connection-pool>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:14:12+00:00Added an answer on June 4, 2026 at 10:14 pm

    JPA uses a two-tier caching mechanism. The first level cache is the current PersistenceContext. The Level-2-cache is shared among different contexts.

    You can control caching behavior. It is dependent on the JPA implementation you are using. Since you are on EclipseLink see this introduction. However this would degrade performance of your application.

    Restarting the application (not the server) is what we do if we need to update the database manually. If it happens more often in production state, you should fetch the relevant data directly from the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having problem updating my mysql in my web application.. I can't Update
I'm having a problem with my web app (JSF+JPA). I deploy it on Glassfish
I'm having a bit of a problem building a Java Enterprise Edition web application
Start a new web application using NetBeans 7 on GlassFish 3.1 In index.xhtml body
I having problem when I deploy an application on Windows Mobile Device .The device
I am having problems to change the charset in my web application response from
Having problem with my application, I seem to be new in ios. My project
I am having problem rightnow because when I am logging in on mysql using
I having problem in my application.. I am pressing back button in my third
I having problem managed thread parallel in console application. I am running 10 threads

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.