return connObj;
} else if(type.equals(TYPE_SESSION)) {
final ConnectionListenerImpl connListenerImpl = new ConnectionListenerImpl();
final BBMPlatformSessionListener sessionListener = new SessionListener(connListenerImpl);
final BBMPlatformSession session = msgService.createSession(sessionListener);
SessionObject connObj = new SessionObject(session, true);
connListenerImpl.setConnectionObject(connObj);
return connObj;
} else {