dushkindigital / marketmap

New, clean repo for Shekhar
2 stars 0 forks source link

Persisting Marketplace Authorization(s) @ Logout/Login #39

Closed pdushkin closed 12 years ago

pdushkin commented 12 years ago

Hi Shekhar,

This may not be an issue. I think it might be due to the fact that you are updating the code frequently and I have to recreate my account. But, just as a sanity check, when I authorize my account (in this case, using eBay), does that authorization persist when I log out and log back into the system (i.e. I don't have to authorize myself a second time)? I feel like I have to go though the authorization every time I want to create an item. Again, this may be due to the frequent code updates. I am at work right now - I'll try testing this more thoroughly when I get home.

Thanks again.

shekhargulati commented 12 years ago

Hello Peter,

Marketplace Authorizations are persistent and stored in mysql database. Yes you are correct that all the database data is lost when I deploy the application because in persistence.xml file I have specified hibernate.hbm2ddl.auto value as create. So each time I deploy the application it re-creates the database so old data gets lost. I will change it to update so that data is not lost. and only schema changes are applied. Another probable reason why application get redeployed is the way most platform as a service solutions work. It happens that if your application is idle and no request is coming they stop the instance and when some request come they reload the application. Again because of hiberante parameter database is initialized. The change of value to update should fix this problem. I will make this change right now so I am closing this issue. In case you face this problem again please reopen the issue.