Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Mapping classes to multiple database schemas with different tables

754801Sep 12 2011 — edited Sep 20 2011
I have been unsuccessful finding answers/topics in this forum related to the following scenario.

Ours is a distributed high volume data driven SOA system written originally in C and now getting migrating to Java. The database schema is distributed and follows the pattern of one database per top level entity. For e.g: Customer is in CustomerDB, Account is in AccountDB, user in UserDB and so on. There may be related tables to each of these entities in the same database, for e.g: UserDB has UserProfile, etc but as the entire system, the high level domain objects are residing in their own distributed database schemas. Due to database limitations when a table in one schema grows too big, it gets split up and put into its own database, giving it the more resources. A lot of these data model decisions are due to the legacy I won't be able to answer why it has been designed this way. The C services seem to work well in this model and most of the business logic are database centric.

Now that we are moving to Java, we want to take advantage of the OO features and write code rich in OO and not DB centric. The problem now is how do I map my Java entities to DB objects that are residing in multiple databases? I want to be able to navigate through the object graph from Customer to Account to Order etc. I came across multi-tenancy features and partitioning based on the data range, but in these cases all the databases still have the same schema.

Any usecase logic would involve call to multiple databases to gather its data and work on it (today it happens as discrete service calls to each of these databases). How do I accomplish mapping Java classes in my application to multiple databse schemas, thereby using all the JPA features? Any advise on this problem would be very helpful

Thanks
Sairam
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2011
Added on Sep 12 2011
4 comments
1,910 views