Thanks for the reply but I am not sure if I follow with what you are saying. As HttpClient is not serializable atleast not the commons-httpclient, I am not sure what good it would help. Currently in my AppointmentManager <https://github.com/TheAntimist/openmeetings/blob/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/AppointmentManager.java>, I have ensured the creation of only one HttpClient and reusing the old one, if one already exists. [Code] <https://github.com/TheAntimist/openmeetings/blob/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/AppointmentManager.java#L75>

But currently the behaviour for the user and password prompts are whenever the server returns a 401 Unauthorized, but I don't keep the credentials in the memory only for the period of that sync. And then remove them. This causes the user to enter the credentials for each sync.

So, I was wondering if I should keep the credentials in memory for the period of when the CalendarPanel is visible before replace. But it's just a suggestion, because implementing this, would require me to keep a Credential or StateTable, for each user in the CalendarPanel, so as to seperate the data of the each user for different hosts. Personally, I could implement it, but not sure if it's necessary.

Also, as I stated earlier about caldav4j, the library I modified to use, currently most of my modifications have been included into the developer branch here: https://github.com/caldav4j/caldav4j/tree/jcr-dev

But it's not in maven yet, since it's a developer branch.So, I was wondering how are we going to use the latest caldav4j in openmeetings?

Ankush Mishra

On 08/01/2016 07:51 PM, Maxim Solodovnik wrote:
If I were you I would create final field for the client (if it is serializable)

--
WBR
Maxim aka solomax

--
Ankush Mishra

Reply via email to