Thursday, October 18, 2007 02:55 PM
You could look at creating some views that return the same columns in each database. Your EJBs then wouldn't care which database they were using. For example, every database would have a view that returned "employee email", "employee id" and "name" and the EJB wouldn't have to know which tables that view gathers the info from.
But you still have to write the views for each database. Which is easier for you - writing session beans for each or writing views for each?
Also, this approach would only work for retrieval, not insert/update.