Among these changes, the minimum JDK version required is now 7 Update 65, or 8 Update 20, so you'll need to update if you intend to use it with anything less; it likely just won't start otherwise!
Updated Platforms and Specifications
As you might expect from any major update to an application server (even if it is just a minor point release), and particularly since GlassFish still holds itself as the Java EE reference application server, there is now support for more recent platforms and Java EE specifications.
Java SE 8Arguably the headline new feature, GlassFish 4.1 now supports Java SE 8, bringing it up to date with the latest Java specifications. This brings with it all of the new features available in Java 8, such as Lambda expressions, a brand new Date and Time API, and concurrent accumulator classes. There’s quite a stir around the introduction of Lambda expressions, and how it adds some functional programming “oomph” to the Java language.
PermGen No More?
Some of you who have already updated your HotSpot JDK to version 8 may have noticed when starting GlassFish 4.1 that a message appears declaring that your PermGen JVM settings are getting ignored, as they’re no longer supported. Whilst some of you who have spent hours monitoring and tuning the PermGen of GlassFish over the years may briefly celebrate at its “removal”, I’m sure some of you are sceptical and curious as to how it could just be removed, and you’re right to be; PermGen has been replaced by Metaspace. Memory allocations for class metadata are now done from native memory, which is limited by the amount of available native memory. In effect, the new Metaspace will dynamically resize itself to prevent the out of memory errors you’d typically get from PermGen. Detrimentally though, if you happen to have a memory leak, and don’t specify the new MaxMetaspaceSize (similar to the now defunct MaxPermSize flag), the Metaspace will continue to increase in size.
Tyrus - WebSocket 1.1
Implemented in GlassFish by Tyrus 1.8.1, this small update to the WebSocket specification, in short, allows Lambda expressions to be used as message handlers without resorting to workarounds, particularly useful given that they’re now available in Java! The updated specification adds two new addMessageHandler() methods to solve the issues, preserving the original method to maintain backwards compatibility. Tyrus 1.8.1 also adds additional features on top of the implementation of the Websocket 1.1 specification, such as client support for HTTP Basic / Digest.
Weld - Contexts and Dependency Injection 1.2The CDI of the Java EE 7 specification, provided by Weld, has also had a minor point update, bringing with it a few changes. Among these, of note, is that the set of Bean defining annotations has been changed to prevent issues with frameworks implementing the AtInject specification, and the non-portable behaviour has been standardised to make the BeanManager more permissive during initialisation. Weld itself has also seen some improvements on top of the updated CDI specification, notably, it is now capable of using bytecode-scanning utilities to speed up deployment; they claim that you can observe up to 20% faster deployment times for very large deployments (> 5000 classes).
What would an update be without bug fixes? Oracle is proudly touting that there are over 1000 bug fixes incorporated into this release (feel free to count them if you particularly want!), brought in from the many subprojects that make up GlassFish. All of these will make GlassFish that much more secure, stable, and popular.
And there you go, a brief overview of the newly updated GlassFish 4.1. There are numerous other feature improvements that I haven’t covered here, such as OpenMQ, the JMS provider, now supporting communication over websockets, or Jersey, the JAX-RS provider, adding client-side server-sent event reconnection support to its feature list. Whilst there might not have been a massive advance in the Java EE specification space, the improvements and numerous fixes to GlassFish definitely heralded a minor point release. A lot of work went into this release, and GlassFish is all the better for it.