Beranda · · · ·

New JPA and Stored Procedures By Patricbensen

I recently stumbled upon many queries on google about how to make Stored Proc calls via JPA. Something was not right with questions like this.

Stored Procs and JPA are completely different beasts with completely different philosophies behind them. Sure you can call stored procs using JPA but thats using the wrong hammer. JPA deals with persistence of entities; Stored procs, with business logic being closest to the data.

If you have a lot of business logic in stored procs, you have the advantage of speed, security and maintainability, however, you lose portability of your business logic if you change your database. Now, in any large-scale enterprise, the database vendor is not really going to change and a database (oracle/sql server/db2) is going to be a uniform commitment across the organization. Having said that, even if you have to port the procs from one database to another, the vendor documentation will include quite comprehensive migration guides for the same. They have to :) For the record, IMHO, I normally stick with stored procs for the reasons listed above. I always have some real DBA cats working on my team that perform something called ATM (Application Transaction Modelling) on the database. Look it up (ATM). Once they are through with this you can flex your ORM muscles all you like, but in the end what you will be left with will just be UGLY. 

Been there, done that, got the T-Shirt.  

If there's one book you should read on JPA, let it be this:

New HP Laptops with XP - Brightness buttons dont work - Fix By Patricbensen

If you've got a new HP laptop and have formatted it (to probably get rid of the lousy Vista OS)
and installed or downgraded it to XP you'll have noticed something that people all over seem to be annoyed with:
The brightness keys Fn F7 and F8 don't work once the XP OS starts loading into memory.

HP has probably rigged this to work only with Vista. So you're stuck.. right?
Nope :)

Here's the surefire fix:
1. Just download the .NET 2.0 framework from microsoft
2. And then hop across to HP and search for something called HP Quick Launch Buttons or do a google search for "HP Quick Launch Buttons "
3. Download it for your laptop model. Install it and reboot.

After this you should have your laptop running XP with the Fn F7 and F8 brightness buttons working!