List Info

Thread: Adding users who require authorization




Adding users who require authorization
user name
2006-09-11 09:19:48
Hi,

When adding such users there seems to be a problem. The GUI
is blocked, 
the responses are slow.
In this process there are three parts from the code
involved.
1. UI
2. Metacontact list
3. Authorization Impl of icq protocol

I'm dealing now with this problem.
Here is something interesting that I had just found.
See It and give ideas.

The gui acts like I said. The strange thing is when I add a
single 
logger.info everything changes.
And here the gui starts to work OK.

net.java.sip.communicator.impl.contactlist.MetaContactListSe
rviceImpl
line : 298

put for example
Logger.getLogger(this.getClass().getName()).info("befo
re 
wait for event");
just before
evtRetriever.waitForEvent(CONTACT_LIST_MODIFICATION_TIMEOUT)
;


And report is it working and give ideas )

damencho

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

Adding users who require authorization
user name
2006-09-11 09:24:58
Hi Damian,

I have just tested and nothing changes for me :(

Yana

Damian Minkov wrote:
> Hi,
>
> When adding such users there seems to be a problem. The
GUI is 
> blocked, the responses are slow.
> In this process there are three parts from the code
involved.
> 1. UI
> 2. Metacontact list
> 3. Authorization Impl of icq protocol
>
> I'm dealing now with this problem.
> Here is something interesting that I had just found.
> See It and give ideas.
>
> The gui acts like I said. The strange thing is when I
add a single 
> logger.info everything changes.
> And here the gui starts to work OK.
>
>
net.java.sip.communicator.impl.contactlist.MetaContactListSe
rviceImpl
> line : 298
>
> put for example 
>
Logger.getLogger(this.getClass().getName()).info("befo
re wait for 
> event");
> just before
>
evtRetriever.waitForEvent(CONTACT_LIST_MODIFICATION_TIMEOUT)
;
>
>
> And report is it working and give ideas )
>
> damencho
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

Adding users who require authorization
user name
2006-09-11 09:28:37
I've experienced similar behaviour without adding contacts.
I wonder 
whether this could be caused by usage of
SwingUtilities.invokeLater(). 
I've mentioned this to Yana and she agreed to replace all
calls to 
SwingUtilities.invokeLater() with execution of a new thread.
Maybe this 
would change something.

Yana, I know that you have lots of uncommitted modifications
on the UI. 
When do you think that you would be ready to commit the
replacement?

In the mean time, there was a problem when receiving
authorization 
requests (in ICQ). The SIP Communicator would completely
freeze any time 
anyone trying to add us to their contact list sends an
authorization 
request. Damencho, do you think you would be able to have a
look at that 
until Yana is ready to commit?

Emil

Damian Minkov wrote:
> Hi,
> 
> When adding such users there seems to be a problem. The
GUI is blocked, 
> the responses are slow.
> In this process there are three parts from the code
involved.
> 1. UI
> 2. Metacontact list
> 3. Authorization Impl of icq protocol
> 
> I'm dealing now with this problem.
> Here is something interesting that I had just found.
> See It and give ideas.
> 
> The gui acts like I said. The strange thing is when I
add a single 
> logger.info everything changes.
> And here the gui starts to work OK.
> 
>
net.java.sip.communicator.impl.contactlist.MetaContactListSe
rviceImpl
> line : 298
> 
> put for example
Logger.getLogger(this.getClass().getName()).info("befo
re 
> wait for event");
> just before
>
evtRetriever.waitForEvent(CONTACT_LIST_MODIFICATION_TIMEOUT)
;
> 
> 
> And report is it working and give ideas )
> 
> damencho
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

Adding users who require authorization
user name
2006-09-11 09:30:35
I suppose its some sort of synchronize problem. Cause to me
it was 
working from every time . but now started not to work every
time.
Strange! Still looking at it.

thanks

Yana Stamcheva wrote:
> Hi Damian,
>
> I have just tested and nothing changes for me :(
>
> Yana
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

Adding users who require authorization
user name
2006-09-11 09:35:16
Ok I will look at receiving authorization requests 

Emil Ivov wrote:
> I've experienced similar behaviour without adding
contacts. I wonder 
> whether this could be caused by usage of
SwingUtilities.invokeLater(). 
> I've mentioned this to Yana and she agreed to replace
all calls to 
> SwingUtilities.invokeLater() with execution of a new
thread. Maybe 
> this would change something.
>
> Yana, I know that you have lots of uncommitted
modifications on the 
> UI. When do you think that you would be ready to commit
the replacement?
>
> In the mean time, there was a problem when receiving
authorization 
> requests (in ICQ). The SIP Communicator would
completely freeze any 
> time anyone trying to add us to their contact list
sends an 
> authorization request. Damencho, do you think you would
be able to 
> have a look at that until Yana is ready to commit?
>
> Emil

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

Adding users who require authorization
user name
2006-09-11 11:07:38
Hi Emil,

Emil Ivov wrote:
> I've experienced similar behaviour without adding
contacts. I wonder 
> whether this could be caused by usage of
SwingUtilities.invokeLater(). 
> I've mentioned this to Yana and she agreed to replace
all calls to 
> SwingUtilities.invokeLater() with execution of a new
thread. Maybe 
> this would change something.
These days I've read a lot about Swing and threads and
particularly 
about SwingUtilities.invokeLater() method and I think that
now I 
understand better how it should be used. I'll go throughout
the code and 
replace this method, where its use is inappropriate. It
could not be 
replaced by invoking a new thread, because of the
single-thread rule in 
swing but I agree that there are many cases where I haven't
used it 
appropriately.
>
> Yana, I know that you have lots of uncommitted
modifications on the 
> UI. When do you think that you would be ready to commit
the replacement?
Yes, I think I'll finish later today and I'll commit all
changes.
>
> In the mean time, there was a problem when receiving
authorization 
> requests (in ICQ). The SIP Communicator would
completely freeze any 
> time anyone trying to add us to their contact list
sends an 
> authorization request. Damencho, do you think you would
be able to 
> have a look at that until Yana is ready to commit?
>
> Emil
>
> Damian Minkov wrote:
>> Hi,
>>
>> When adding such users there seems to be a problem.
The GUI is 
>> blocked, the responses are slow.
>> In this process there are three parts from the code
involved.
>> 1. UI
>> 2. Metacontact list
>> 3. Authorization Impl of icq protocol
>>
>> I'm dealing now with this problem.
>> Here is something interesting that I had just
found.
>> See It and give ideas.
>>
>> The gui acts like I said. The strange thing is when
I add a single 
>> logger.info everything changes.
>> And here the gui starts to work OK.
>>
>>
net.java.sip.communicator.impl.contactlist.MetaContactListSe
rviceImpl
>> line : 298
>>
>> put for example 
>>
Logger.getLogger(this.getClass().getName()).info("befo
re wait for 
>> event");
>> just before
>>
evtRetriever.waitForEvent(CONTACT_LIST_MODIFICATION_TIMEOUT)
;
>>
>>
>> And report is it working and give ideas )
>>
>> damencho
>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
>> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
>>
>>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

Adding users who require authorization
user name
2006-09-11 13:20:44
About the problem when receiving authorization request!
There is some 
timeout when request is received.
I found the problem comes from the method 
ContactIcqImpl.getDisplayName() there is the wait which
stops the whole 
process
First the ContactIcqImpl.getDisplayName() through this
process is called 
6 or 7 times.
The process of handling display name (nick name retrieving)
is as follows.
    We do not want to wait and retrieve nicknames (because
this method 
is called many times) and nickname retrieve is not so quick
     The contact uin is put in Vector for later retrieve.
The idea is to 
be as quick as possible.

First the code is here 
net.java.sip.communicator.impl.protocol.icq.ServerStoredCont
actListIcqImpl  
in inner class NickRetriever.
But what happens. There are two methods the first is the run
method for 
the thread. The second is for adding contacts for
retrieving.
The problem is when there is contact for retrieving and the
thread comes 
to the moment (in run() method) :
String nickName = getParentProvider().
                                
getInfoRetreiver().getNickName(contact.getUIN());
Which is the slow one. but this is in 
synchronized(contactsForUpdate){ 
block.
And in this moment if we try to add other contact we must
wait this 
process to finish so we can add it.

So the problem is that in this synchronized there is a slow
part . So 
one decision is to make a copy of this vector to clear it
and there ends the synchronized block. And then is the
retrieving and so 
on - the slow part ?

damencho

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

Adding users who require authorization
user name
2006-09-11 13:40:38
OK I see what you mean,

> So one decision is to make a copy of this vector to
clear it
> and there ends the synchronized block. And then is the
retrieving and so 
> on - the slow part ?

Yes. That would be great. Only copy and clear
contactsForUpdate in the 
synchrnozed block should be quick enough and would avoid any
race 
conditions. Good idea!

Emil


Damian Minkov wrote:
> About the problem when receiving authorization request!
There is some 
> timeout when request is received.
> I found the problem comes from the method 
> ContactIcqImpl.getDisplayName() there is the wait which
stops the whole 
> process
> First the ContactIcqImpl.getDisplayName() through this
process is called 
> 6 or 7 times.
> The process of handling display name (nick name
retrieving) is as follows.
>     We do not want to wait and retrieve nicknames
(because this method 
> is called many times) and nickname retrieve is not so
quick
>      The contact uin is put in Vector for later
retrieve. The idea is to 
> be as quick as possible.
> 
> First the code is here 
>
net.java.sip.communicator.impl.protocol.icq.ServerStoredCont
actListIcqImpl  
> in inner class NickRetriever.
> But what happens. There are two methods the first is
the run method for 
> the thread. The second is for adding contacts for
retrieving.
> The problem is when there is contact for retrieving and
the thread comes 
> to the moment (in run() method) :
> String nickName = getParentProvider().
>                                 
> getInfoRetreiver().getNickName(contact.getUIN());
> Which is the slow one. but this is in 
synchronized(contactsForUpdate){ 
> block.
> And in this moment if we try to add other contact we
must wait this 
> process to finish so we can add it.
> 
> So the problem is that in this synchronized there is a
slow part . So 
> one decision is to make a copy of this vector to clear
it
> and there ends the synchronized block. And then is the
retrieving and so 
> on - the slow part ?
> 
> damencho
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

[1-8]

about | contact  Other archives ( Real Estate discussion Medical topics )