Tuesday, April 26, 2011

Moving BPEL Data and Files to a test environment - 1

We had to recently capture a snapshot of BPEL metadata from production to be put in an test environment where some of the long running processes were continued and observed in the new test environment. So we started with a consistent copy of production BPEL database and then copied all BPEL deployment files from $OC4J_HOME/bpel/domains/default/tmp directory to the new environment where OC4J was running.

Then we had to ensure that the new test environment was isolated so that continuing process instances in this test environment would not interact with production systems. Unfortunately our production network was not isolated from the test servers. In other words all production servers were resolvable from this test servers.

So we had to come up with some tweaks on the server that was hosting OC4J application server to prevent the new instance from responding to actual clients.

- Production ports for OC4J were restricted only from the production Web servers.
- Redirected all production partner link hosts to 127.0.0.1 in the Windows hosts file of the OC4J test server.
- Redirected all production cluster and node hostsnames for OC4J to 127.0.0.1 as well in the Windows hosts file of the OC4J test server.

This did it for us as the client base for BPEL processes were small, so we could do an inventory of all client machines and then route them to 127.0.0.1 in windows hosts file to prevent the test instance talking to production clients. It could have been worse if the client base was wide and they made async calls.