lundi 1 juin 2015

Java Rest Client using Multiple Threads

I have a java Rest Client which will keep post data to java Rest Service

I have developed jersey client code to post data to Rest Service. when i execute My Client application 1)It will connect to the database and it will execute select query 2)It will connect to the Rest service URL and it will post the data

My code:

    select * from Workorder

    for(int i =0;i<workorderList.size(); i++){

    WorkOrder workorder=workorderLit.get(i);

   WebResource webResource = client
                    .resource("http://localhost:8013/Workorderrest/rest/inbound/update");

            ClientResponse response = webResource.accept("application/json")
                    .type("application/json")
                    .header("Authorization", "Basic " + authStringEnc)
                    .post(ClientResponse.class, jsonData);   
    }
    }

I want to change the statusflag in my table to processed when I receive an acknowledgement from Rest Service

Could any one please.I want to post data using Multiple threads any suggestions

Aucun commentaire:

Enregistrer un commentaire