I am in a need of multiple Transaction. But Bada is allowing me to do only one transaction. How to increase the number of Transaction? The code which i am using is
result HttpClient::TestHttpGet(Osp::Base::String link1)
{
int r1;
result r = E_SUCCESS;
HttpTransaction* pTransaction = null;
HttpRequest* pRequest = null;
String hostAddr(link1);
if(__pSession == null)
{
__pSession = new HttpSession();
r = __pSession->Construct(NET_HTTP_SESSION_MODE_NORMAL, null, hostAddr, null);
if (IsFailed(r))
goto CATCH;
}
pTransaction = __pSession->OpenTransactionN();
r1=__pSession->GetActiveTransactionCount();
AppLog("Total no of transaction:%d",r);
if (null == pTransaction)
{
r = GetLastResult();
goto CATCH;
}
r = pTransaction->AddHttpTransactionListener(*this);
if (IsFailed(r))
goto CATCH;
pRequest = const_cast<HttpRequest*>(pTransaction->GetRequest());
if(pRequest == null)
{
r = GetLastResult();
goto CATCH;
}
r = pRequest->SetUri(link1);
if(IsFailed(r))
goto CATCH;
r = pRequest->SetMethod(NET_HTTP_METHOD_GET);
if(IsFailed(r))
goto CATCH;
r = pTransaction->Submit();
if(IsFailed(r))
goto CATCH;
return r;
CATCH:
return r;
}