This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a requirement to make entry to the database for all the custom classes(other than standard ones provided by Java),whenever these are loaded in the application. I can think of the following approach
-- have static block in all the user defined classes
-- write the required database loading part in the static block.
Do you think that there is a better approach for this?
I suggest you have classes which simply connect to the database, taking care of any concurrency problems. Then use those classes for all database access. I presume you have read the relevant Java™ Tutorials section?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com