JSONP

JSONP, JSONWithPadding

import org.eclipse.persistence.oxm.JSONWithPadding;
...

@GET
@Produces("application/x-javascript")
@Path("/jsonp")
public JSONWithPadding<BannerEntity> getJSONP(@QueryParam("callback") String callback) {
    List<BannerEntity> banners = bannerService.findAll();
    if (null == callback) {
        return new JSONWithPadding(banners);
    } else {
        return new JSONWithPadding(banners, callback);
    }
}