Skip to content

Instantly share code, notes, and snippets.

@theotherian
theotherian / Jersey Resource Filters via Custom Annotations
Last active March 5, 2018 17:51
A DynamicFeature implementation for binding filters to resources with Jersey 2.0, in this case flagging certain resources as not supporting Internet Explorer 6.
Files for demonstrating custom binding of Jersey resource filters using annotations
@theotherian
theotherian / Java Constant Gotchas
Last active December 19, 2015 12:19
Constants and how they can be misleading
Sample code for ways Java Constants may not work as you would expect
@theotherian
theotherian / Toggling Wifi via Applescript
Last active January 15, 2024 00:50
An AppleScript for toggling wifi on and off
A script for turning wifi on and off on a Mac
Files for creating Maven Archetypes - part 1
XML for pom files to declare a dependency on Thread Local DNS
Files for creating Maven archetypes - part 2
@theotherian
theotherian / Maven Archetypes Part 3
Created July 9, 2013 04:59
Maven Archetype how tos Part 3
Files for creating a Maven Archtype - part 3
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.
An example of creating an in-memory HSQLDB server
There are two dependencies that Jersey 2.0 has for adapting its application to a Servlet instance.