[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Query on Issue faced with OpenShift Java Client



Shabna,

To highlight Andre's explaination, OSJC does not require you to create a new connection everytime, but it is not aware of changes you made on the server-side unless you perform a refresh operation.  There is no functionality that pushes state to your specific instance of the client, for instance when you removed the application using 'rhc'.

----- Original Message -----
From: "André Dietisheim" <adietish redhat com>
To: "Shabna M" <shabsrh gmail com>, dev lists openshift redhat com
Sent: Wednesday, September 10, 2014 5:56:53 AM
Subject: Re: Query on Issue faced with OpenShift Java Client

Hi Shabna 

I now added unit- and integration tests for the bad behaviour that you reported. Both pass without modification in the code in openshift-java-client: 

https://github.com/openshift/openshift-java-client/blob/master/src/test/java/com/openshift/internal/client/ApplicationResourceTest.java#L106 
https://github.com/openshift/openshift-java-client/blob/master/src/test/java/com/openshift/internal/client/ApplicationResourceIntegrationTest.java#L95 

So in consequence I highly suppect some other flaw in your code. Can you paste a full example of what you're doing? 

Cheers 
André 

On 09/10/2014 08:13 AM, Shabna M wrote: 





Hi 



I have faced a small issue while using Open Shift Java Client and will appreciate any thoughts on the same: 



Issue: I have an application that uses Open shift java client to do couple of operation on an application : Following is the code snippet -(not actual code;just indicative) 





IOpenShiftConnection connection = getConnection(); 

IUser user = connection.getUser(); 

IDomain domain = user.createDomain( "myDomain" ); 

IApplication application =domain.getApplicationByName(appName); 





Now I would not want to do get connection every time and want to login to OS once and use the same connection object for any subsequent operations for performance reasons. 

But I saw that while doing the same ,it is not actually reflecting the changes done on the platform.For example if a delete the application from the backend (rhc) 

It is not reflected while I do IApplication application =domain.getApplicationByName(appName); 

It needs for me to again get a connection and do all the process. 



Need to understand if I am missing anything or is there a better workaround to avoid login into PaaS everytime to get the latest changes. 





Any pointers would be really appreciated.Need this to fix a performance bottleneck 



Thanks 
Shabs 


_______________________________________________
dev mailing list
dev lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]