views:

42

answers:

1

Hi!

When designing a new J2EE based enterprise framework, do I have to prepare for the situation where separate business modules have to use different databases and have to run on different application server instances?

From another point of view: has anyone ever experienced a real life requirement for different databases & servers per module? If yes, what was the size of that enterprise?

Because (as far as I can see) this makes things a lot more complicated, and with the previous version of this framework (and in smaller banks), the case above never happened.

Thanks for the replies!

A: 

I'm not sure I've understood this phrasing correctly

where separate business modules have to use different databases

All the time.

Perhaps we're talking about different things here. I've never met any organisation without at least two databases. That includes me and my CD catalogue and guitar tunes databases on my laptop.

Do you mean different database vendors? Database versions, like Oracle vX and Oracle vY? Even under that definition I can think of no customers I've encountered who have universally stanadardised one one vendor or version.

So, would I expect a non-trivial system to have some modules looking at one database and some looking at another. Yes abolsutely.

Would I expect some modules to look at two databases, yes. Reference data in one live in another. History in yet another.

Different modules on different servers - yes. For reasons of isolation and scalability. That's one thing App Servers do quite well.

Overall, why do you see this as a problem? Your modules look up their JDBC connections in JNDI, they don't need to know that they are using different databases. It's an admin problem to wire up the modules correctly.

One major issue could be the use of XA transactions, but it's often possible to avoid updating both databases in the same module, or if from the same module in the same transaction.

djna