reading what you experience sounds like a bug or bad usage, we always reuse the very same connection in JBoss Tools (where we use openshift-java-client), we never recreate the connection once it's created.
Especially when removing applications from a domain the domain should reflect the change, it should not report the application that you just removed. We have a unit-test that asserts this:
final IApplication app = domain.getApplicationByName("springeap6");
In the above test we assert #getApplications but #getApplicationByName should be transparent since it operates on the very same collection. I'll push another unit test to assert that #getApplicationByName works correctly.
I suspect that there's some other issue that is causing this weird behavious for you. Can you maybe paste a full example that shows what you experience?
Btw. you can refresh the domain (and all resources: application etc.) and force it to load the state from the backend: IDomain#refresh
On 09/10/2014 08:13 AM, Shabna M wrote: