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.
Hi, Current project : JSP / Oracle database. New requirement : JSP / SQL server Problem : Oracle queries not compatible to SQL Server. Question: What is the best way to solve this in the java bean? Solution 1 : Maintain two packages 1.Oracle 2.SQL Server Solution 2 : Maintain single pacakge with if / else statement for Oracle and SQL Server queries. We need to maitain the code in both Oracle and SQL Server for all later versions of this project. Any help in deciding the best approach is appreciated.
I'd treat this the same as any internationalization/localization issue: Load your SQL from a resource bundle at runtime, depending on which database you are connecting to. Or alternatively, consider EJB-CMP which should take care of all that stuff for you.
I was considering this solution but didn't know how to implement this in the javabean.I have implemented Internationalization in the jsp pages using the resource bundles. If we have 2 set of resource bundle, one for Oracle and other for SQL, how to implement this in the calling java bean?
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