Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created July 7, 2015 05:40
Show Gist options
  • Save AdamBien/a0fedea018c96f43f33a to your computer and use it in GitHub Desktop.
Save AdamBien/a0fedea018c96f43f33a to your computer and use it in GitHub Desktop.
17thAirhacksQ&A
@rangalo
Copy link

rangalo commented Jul 31, 2015

Hello Adam,

How to conform to YSlow rules using JSF ? Can we use some cdi, interceptor magic here ?
You don't need to go though all the rules. I just want to know the basics.
For example expires headers and tagging the images, js and css files with timestamps, how to go about it ?

@meshuga
Copy link

meshuga commented Jul 31, 2015

There are questions about Kafka and Akka, so I want to ask you about your opinion about Vert.x.

@ahochleitner
Copy link

hello adam,
i have some questions concerning the actual situation about open source and production ready JavaEE-AppServers.
.) In previous days I could use glassfish in production without costs but i could decide to pay for a production license too. That was fine. Today with Wildfly I have a similar situation. I can develop and run wildfly in production, but when i want to pay for a production license, I have to switch to Jboss EAP (which is not available yet for JavaEE 7). As a consequence I have "diffferent" products (Wildfly and Jboss EAP). Is this correct? Or do i miss something? (is here a similar situation with TomEE?)
.) Websphere Liberty Profile has a similar situation compared to glassfish, but i have a restriction when using in production without a payed license (2 Gig?).
.) With Docker in mind I see the Liberty Profile especially designed for docker use (lightweight, fast, modular, ...). What about Wildfly and TomEE in Docker use? There exist no "special" docker versions.
Does that mean, that they are dockerable enough out of the box? Do there exist Benchmarks or other technical infos when comparing multi ear's/war's Applications on one AppServer on Docker with one ear/war/AppServer/Docker-Architecture? (i mean an application, consisting for instance of 10 ear's/war's. On the one hand, I can use one AppServer inside a Docker Container for all 10 ear's/war's. Or I take for each ear/war one AppServer inside a Docker container. So i have 10 parallel AppServers inside 10 docker containers).
thanxs in advance, andy

Copy link

ghost commented Aug 11, 2015

Hello, Im new to JAX-RS approach and i've a particular questions. can anybody answer?

I've a method like following in a service class

@GET
@Produces(MediaType.APPLICATION_JSON)
    public Response listUsers( //PaginatedListWrapper
            @QueryParam("page") @DefaultValue("1") Integer page,
            @QueryParam("sortFields") @DefaultValue("id") String sortFields,
            @QueryParam("sortDirections") @DefaultValue("asc") String sortDirections) {

        PaginatedListWrapper listWrapper = new PaginatedListWrapper<>();
        listWrapper.setCurrentPage(page);
        listWrapper.setSortFields(sortFields);
        listWrapper.setSortDirections(sortDirections);
        listWrapper.setTotalResults(this.countAll());

        int start = (listWrapper.getCurrentPage() - 1) * listWrapper.getPageSize();
        listWrapper.setList(userFacade.findRange(new int[]{start, listWrapper.getPageSize()}));

        return Response.status(Response.Status.OK).entity(listWrapper).build();
    }

my PaginatedListWrapper class like follows

public class PaginatedListWrapper {
    private Integer currentPage;
    private Integer pageSize;
    private Integer totalResults;
 
    private String sortFields;
    private String sortDirections;
    private List list;

and im getting output like the following

Object {
currentPage: 1, 
list: Array[2],
0: "net.brac.ict.mis.tup.uplift.business.entities.User[ id=1 ]"
1: "net.brac.ict.mis.tup.uplift.business.entities.User[ id=2 ]" 
pageSize: 10, 
sortDirections: "asc", 
sortFields: "id"…
}

why im not getting the list of users as json object? like array of objects [{}, {}, {} ...]
what im missing here?
other than using jersey or jackson, i want to learn the underneath core stuffs of doing this.
in my maven it just javaee-web-api and eclipselink

Copy link

ghost commented Aug 12, 2015

Anyone please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment