Skip to content

Instantly share code, notes, and snippets.

theotherian

Block or report user

Report or block theotherian

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@theotherian
theotherian / ClientFactory.java
Last active Sep 12, 2018
configuring Jersey 2 client
View ClientFactory.java
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import org.apache.http.HttpHost;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.impl.conn.PoolingClientConnectionManager;
import org.glassfish.jersey.apache.connector.ApacheClientProperties;
import org.glassfish.jersey.apache.connector.ApacheConnector;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
@theotherian
theotherian / Jersey 2.0 client with generics
Last active Dec 20, 2015
Jersey 2.0 client with generics
View Jersey 2.0 client with generics
It's easy to use Generics with Jersey 2.0 client
View ByteBuffer side effects
Using ByteBuffer instances to allocate memory can be dodgy
View Jersey 2.0 servlet dependencies
There are two dependencies that Jersey 2.0 has for adapting its application to a Servlet instance.
View Start in-memory HSQLDB server
An example of creating an in-memory HSQLDB server
View Hibernate WTF - joins and max results
Don't mix eager or subselect joins with max results; the by product is pretty nasty.
Subselects can select all entities in the associated table, and potentially issue an additional select for each parent, while joins often load duplicate entities due to the max results being applied to the row and not the parent.
@theotherian
theotherian / Maven Archetypes Part 3
Created Jul 9, 2013
Maven Archetype how tos Part 3
View Maven Archetypes Part 3
Files for creating a Maven Archtype - part 3
View Thread Local DNS 1.0-RC3 dependency definition
XML for pom files to declare a dependency on Thread Local DNS
View Maven Archetypes Part 1
Files for creating Maven Archetypes - part 1
You can’t perform that action at this time.