I have not tried to use that feature of
JDBC, but here is my
opinion:
In DB2 schema is also your ID in the database. I would doubt that DB2 will let you sign on and then change the schema. Changing the schema before signing on, would serve no purpose.
I typically use the schema.objectname form of referencing database objects in DB2. So if I were doing a select from table XYZ in your example I would use the following SQL:
SELECT col1, col2
FROM ABC.XYZ;
You can also execute a command in DB2 to access another schema from your schema without using the schema prefix, but if there are objects with the same name in your schema, you will have to use the prefix to resolve the ambiguity.
The other alternative would be to login directly to the ABC schema. However, if that is a production schema, many companies restrict access to the schema.
Hope this helps,
Les