JERSEY-1840: Determining the MediaType of Response from available writers does not work correctly

 - optimisations

Change-Id: I307cded22ea02df8ae1863f91bf9f692aa287edf
fixed EJB integration test, the original test is no longer supported by GF v4

Change-Id: Ifda01a40bb2f7f41fe38608291ba5816208f7f08
Merge "fixed EJB integration test, the original test is no longer supported by GF v4"