• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changes made in Database not Reflected in Entity

 
Jose Campana
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdi there Ranchers !

I'm experiencing a problem that's totally new to me, because I'm a JPA newcomer. Here's what's going on:

If I change a database record using MySQL's administrative Tool, And then Invoke a Session Bean that Retrieves that -Just updated-(using the admin tool) DB Record as an Entity(using JPA).... The Entity Retrieved does not reflect the changes that were made directly to the database.

A little more detail about my scenario:

I'm Invoking an Stateless Session Bean From a JSE app. This Session Bean Injects the container's Entity Manager to Retrieve the DB Record as an Entity.
A Business method on the Session Bean delivers the Entity to the Client.

Another Thing:
If I restart my App-Server (GlassFish), And Invoke my Session Bean Again, Then the changes ARE reflected to the Entity.

I don't understand How can I avoid this Issue. Could You guys please help me? I need that the changes made directly to the DB to be reflected to the Entities (Without having to re-start the Server).

That'd be it, that's my latest issue.

I hope somebody can give me a little guidance ,

Good Luck,

Jose
 
Jose Campana
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind,

I figured this one out myself already,



Jose
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic