0

I'm setting up a Maven Enterprise Project in NetBeans 7.2 to develop a MIS (management information system). Happens that we have an old database that has to be migrated to the new one. Until the new tool is not ready for production I must update it from the old, wich system will be still in use.

My problem is: I have two persistence units (let's say "oldBase_PU" and "newBase_PU") but I can't create the EJBs, because there are tables with the same name in both databases. When creating the EJBs, the IDE creates only ONE EJB instead of two (one per database, in different packages).

I have tried creating two EJB projects and adding it to the Maven project but had no success. Any tips on how to accomplish this?

kauedg
  • 827
  • 8
  • 20

1 Answers1

0

Put a prefix to all your old tables, like Old_User and you will be able to migrate data from Old_User to User. Also, you must pay attention to the constraints.

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
  • That's how I'm doing now just to get the projecto going but it's just a workaround not a solution. Unless someone says it can't be done, I'd like to have a solution. =) – kauedg Oct 01 '12 at 12:53
  • Maybe if you resolve somehow to put the entity tables of the two databases in separate namespaces, or if you can create a library for the old database communication and your project would use that library. I'm not sure whether this comment is helpful for you, but if it helps, then it was worth the time to write these thoughts down. – Lajos Arpad Oct 01 '12 at 13:42