File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Same Entity Bean Different DB Tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Same Entity Bean Different DB Tables" Watch "Same Entity Bean Different DB Tables" New topic

Same Entity Bean Different DB Tables

Gillian Daniel

Joined: Dec 09, 2003
Posts: 9
Hello there,
I hope someone can help me.
Currently I am writing approx. 100 entity beans for an application which I am involved in creating. They are container managed, and I will be deploying in weblogic 8.1
25 of the tables in the database are archive tables, where no additional information about the entities are stored, it is just to keep old data.
So basically, when it comes to the time where I create these <i><b>archive</b></i> entity beans, they will be exactly the same as the <i><b>non-archive</b></i> entity beans (apart from the deployment descriptor). Is it possible for me to re-use the non-archive entity beans and just write deployment descriptors for the archive ones? Or do I really have to write the EntityBean, LocalHome and Local interface all over again for the archive ones?
I appreciate any help offered,
Thank -you
Gillian Daniel
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
I think I understand what you're asking, but maybe not. You have some database, with tables in it that you want entity beans and Websphere to ignore, right?
In that case, yes. You can write your deployment descriptors just the normal way, making sure that Websphere doesn't create or destroy the database tables. And it should completely ignore the others. Did that answer what you were asking?

I agree. Here's the link:
subject: Same Entity Bean Different DB Tables
jQuery in Action, 3rd edition