Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 8
Registered: ‎03-30-2011
My Device: Blackberry Bold 9700
My Carrier: O2

Re: Multiple HTTP operations in one program

After fiddling around I've realised the Player thread also blocks the BlackBerry browser from working. So literally there can only be one concurrent HTTP operation. any idea what could be causing this?

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Multiple HTTP operations in one program

Just as an experiment, on an OS 4.5 Simulator, I started 3 concurrent background Threads, all downloading a web page.  All successfully downloaded the page. 

 

I choose an OS 4.5 Simulator because I think OS 4.5 is the most 'restrictive' in terms of http functionality.  So if it works in OS 4.5, it should work in the SImulator that you are using. 

 

Anyway, I didn't have any problems, from which I would conclude that multiple http processing is possible, so it is something else that is 'locking' your processing and meaning that there is only one thing being run at once.

 

In the past, people have complained about this 'single tasking' on the SImulator and it has turned out to be  incorrect coding, like using <thread>.run, instead of <thread>.start,, or using invokeLater() in an inappropraite place, so that even though people thought they were running separate Threads, the code was running on the Event Thread.

 

To eliminate this in your case, can I suggest you put the following code in anything that you think should be a background Thread.  Watch out for any Dialog alerts generated.

 

if ( Application.isEventDispatchThread() ) {

Dialog.alert("running on Event Thread");

}

New Contributor
Posts: 8
Registered: ‎03-30-2011
My Device: Blackberry Bold 9700
My Carrier: O2

Re: Multiple HTTP operations in one program

It seems to be a problem with the proxy I was behind. I can't figure out quite why it was behaving like it was, but it wasn't my program in the end. It works fine on my home connection luckily. Thanks for your help. If anyone else has this problem in future, the best thing to do is try it on another connection and go from there.