We have legacy Oracle procedures and functions in our customers db, in what we call our "infrastructure". These objects are used by several of our applications, but we cannot upgrade all our applications at the same because its too lengthly and complicated.

For example, we have the procedure JOURNALIZE. Our new version of Appl_1 need the new version of JOURNALIZE wich now use the new package P1. But the other applications cannot use the new JOURNALIZE, even if the interface is the same, because P1 needs to be initialized by the application.

So we decided to provice JOURNALIZE, with the same number of arguments, but which will dispatch the processing to JOUNALIZE_OLD, or JOURNALIZE_NEW, depending if P1 has is present, or has been initialized.

But then we realize we need to do that to a bunch of other procs and funcs.

Is there some king of approach, or design pattern, we can use to keep our legacy objects have the same interface, but provide different behavior depenping on who is calling.

Any ideas are welcome.