Thursday, October 30, 2008

Joke

A woman goes to her boyfriend's parents' house for Christmas dinner.

This is to be her first time meeting the family and she is very nervous.

They all sit down and begin eating a fine meal.

The woman is beginning to feel a little discomfort, thanks to her nervousness and the broccoli casserole. The gas pains are almost making her eyes water. Left with no other choice, she decides to relieve herself a bit and lets out a dainty fart.

It wasn't loud, but everyone at the table heard the poof.

Before she even had a chance to be embarrassed, her boyfriend's father looked over at the dog that had been snoozing under the woman's chair, and said in a rather stern voice, 'Skippy!'.

The woman thought, 'This is great!' and a big smile came across her face.

A couple of minutes later, she was beginning to feel the pain again.

This time, she didn't even hesitate. She let a much louder and longer rrrrrip.

The father again looked at the dog and yelled, 'Skippy!'

Once again the woman smiled and thought 'Yes!' A few minutes later the woman had to let another rip. This time she didn't even think about it.

She let a fart rip that rivaled a train whistle blowing.

Once again, the father looked at the dog with disgust and yelled, 'Skippy, get away from her, before she shits on you!'

EntityManager

Here's a doozy that I haven't come across yet....
Using JPA. Everything works great when going straight through the JPA application. Data gets retrieved and saved just fine.
If the data is changed in the database by some backend process (or just amnually throught some SQL tool), the JPA application does not refresh the data. It appears to be pulling it from a cache.

I found this great article
http://weblogs.java.net/blog/guruwons/archive/2006/09/understanding_t_1.html

amd info on TopLink JPA Caching
http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html#TopLinkCaching

and.......it worked!!!! :)
added "q.setHint("toplink.refresh", "true");" (where q is Query) to those queries where data could be updated from other process.

JPA and EntityManager

Here's a doozy that I haven't come across yet....
Using JPA. Everything works great when going straight through the JPA application. Data gets retrieved and saved just fine.
If the data is changed in the database by some backend process (or just amnually throught some SQL tool), the JPA application does not refresh the data. It appears to be pulling it from a cache.

I found this great article
http://weblogs.java.net/blog/guruwons/archive/2006/09/understanding_t_1.html

amd info on TopLink JPA Caching
http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html#TopLinkCaching

and.......it worked!!!! :)
added "q.setHint("toplink.refresh", "true");" (where q is Query) to those queries where data could be updated from other process.