Re: AdwordsSession & AdwordsServices for multiple accounts

2012-11-07 Thread Kevin Winter
Hi guys, I'm sorry, it appears I misspoke with regards to the threadsafety of GoogleCredentials. Per the javadoc, this class is indeed threadsafe. Internall

Re: AdwordsSession & AdwordsServices for multiple accounts

2012-10-19 Thread j.e.frank
I've actually decided to postpone my migration to the "new" java library because I don't fully understand how to use the OAuth2 credentials/tokens in a "long lived service" environment. I made a version that created a single GoogleCredential object, and handed that out to all the AdWordsSessio

Re: AdwordsSession & AdwordsServices for multiple accounts

2012-10-19 Thread Oliver
Thanks for the clarification. We indeed use OAuth2. My understanding is the Java client library handles the token refresh automatically. If so, then we don't have any control on ensuring the refresh functionality is done by one thread only, and we will run the risk of multiple simultaneous re

Re: AdwordsSession & AdwordsServices for multiple accounts

2012-10-18 Thread Kevin Winter
Hi Oliver, Yes, the session object should be safe to read in multiple threads (the only caveat is if you are doing OAuth2 and it needs to refresh the token, that wouldn't be threadsafe). Technically, you can also update the credentials as well as partialFailure/validateOnly (and reportMoneyI

Re: AdwordsSession & AdwordsServices for multiple accounts

2012-10-18 Thread Oliver
Thanks Kevin for such an excellent resource. I have a question about the nature of thread safety of the *session *object. So, if we don't make changes to the session* *object at all, does this mean we can use multi threads on the session object (together with the other objects like *ReportDownl

Re: AdwordsSession & AdwordsServices for multiple accounts

2012-10-17 Thread Kevin Winter
Updated - thanks for pointing that out. - Kevin Winter AdWords API Team On Wednesday, October 17, 2012 4:20:05 PM UTC-4, j.e.frank wrote: > > That's useful. Can you also update the Migration Guide, because it > contains contradictory information about the AdWordsServices object? The > migrati

Re: AdwordsSession & AdwordsServices for multiple accounts

2012-10-17 Thread j.e.frank
That's useful. Can you also update the Migration Guide, because it contains contradictory information about the AdWordsServices object? The migration guide calls it heavyweight and non-threadsafe, and the wiki page referenced below calls it lightweight and threadsafe. On Wednesday, October 17

Re: AdwordsSession & AdwordsServices for multiple accounts

2012-10-17 Thread Kevin Winter
Hi Oliver, I just published a wiki page on thread safety in the new java library: https://code.google.com/p/google-api-ads-java/wiki/ThreadSafety - Kevin Winter AdWords API Team On Wednesday, October 3, 2012 3:34:04 PM UTC-4, Oliver wrote: > > Assume we have an MCC with 5 standard adwords acco

Re: AdwordsSession & AdwordsServices for multiple accounts

2012-10-08 Thread David Torres
Hi Oliver, The answers are 1) yes and 2) yes as you might already expect. Best, -David Torres - AdWords API Team On Wednesday, October 3, 2012 3:34:04 PM UTC-4, Oliver wrote: > > Assume we have an MCC with 5 standard adwords accounts inside it. > > An application, using the Java client library,

AdwordsSession & AdwordsServices for multiple accounts

2012-10-03 Thread Oliver
Assume we have an MCC with 5 standard adwords accounts inside it. An application, using the Java client library, authenticates to access the MCC account and gets the required token for the MCC. We now need to access the 5 accounts within the MCC, sometimes simultaneously. Can you please confir