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

Posts: 31
Registered: ‎11-14-2012
My Device: Blackberry 9780
My Carrier: Digicel

Predict null connection descriptor?

Is there any way to know if I will get a null connection descriptor? I've been doing alot of tesitng with OS5 network. I seem to start getting null descriptors after some where in the region of 40 connections. I'm still not sure if that's the case for sure. I'm testing over EDGE. Point is though is there any way to know based on checking if a transport is available to know before hand if you'll get a null descriptor?


This is my canConnect method.

public boolean canConnect() {
// Set ConnectionFactory options
if (transportsAvailable.length > 0) {
for (int i = 0; i < transportsAvailable.length; i++) {
int transportType = transportsAvailable[i];
if (TransportInfo.isTransportTypeAvailable(transportType) && TransportInfo.hasSufficientCoverage(transportType)) {
return true;
return false;

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

Re: Predict null connection descriptor?

Check the logs when you start getting null connections - I suspect there is some issue other than the availability of transports. 


I would look at your processing and make sure that you are correctly closing all your connections. 


If the problem resolves itself when you close the application, or if other applications have problems with connections at the same time you do, this would indicate to me that there is an issue with your connection code.