JCACHE Has Arrived

The most awaited JCACHE also known as JSR 107 – Java Temporary Caching API has finally been released in March 18, 2014. This specification request has been started way back in 2001, nevertheless, over 80% voted for its inclusion in the platform on a 2012 Java EE 7 survey.

In the original proposal posted in the Java Community Process’ website, JCACHE has been described as a specification that standardize process caching of Java objects in a way that allows an efficient implementation, and removes from the programmer the burden of implementing cache expiration, mutual exclusion, spooling, and cache consistency. Objects whose type is not known until runtime can be cached, but only those which implement the serializable interface can be spooled.

The main purpose of JCACHE is to let developers solve usual problems by only writing little code as possible. This will work on any Java platform and will be beneficial to server platforms like servlet container.

It is also said that there are no specifications yet that handle automatic creation and refresh of temporary, in-process data shared across threads. The following are mentioned issues with existing specifications that can be addressed through JCACHE:

Java Naming Directory Interface (JNDI) is used for searching objects by name and an interface for caching implementation. But this application requires checking expiration of retrieved objects after each look up, and synchronizing creation and binding of a new object. Per object cache attributes (e.g., expiration time) would require introduction of an additional level of indirection: the application would look up a cache handle and use one of its methods to access the associated object.

Java.util.Hashtable offers a way of searching objects by name, however, has no way to materialize objects in the cache without application enforcement of expiration and mutual exclusion. HashTable also has no basic spooling capability.

JavaSpaces and Enity Enterprise Java Beans handle caching of persistent, transactional data. Cached data do not always come from data stores; they may be the result of an expensive computation or a remote procedure call. Also, these interfaces do not deal with efficient handling of expiration and refresh of cached data.

Enterprise Java Beans are mainly created for remote access to objects. Although an in-process implementation of EJB is possible, the application code would still have to make all of the additional calls required for remote object access. EJB’s must be pre-defined by the application, and do not have any concept of shared access or expiration.

javax.servlet.http.HttpSession permits named objects of arbitrary type to be cached, but does not have the concept of sharing, invalidation, per object expiration, automatic loading, or spooling.

With its release, JCACHE is now available for download and evaluation.

Java 8: Final Release

Oracle has finally announced the General Availability of the most anticipated open-source implementation of Java SE 8 (Java Standard Edition 8) which is the JDK 8 (Java Development Kit 8) last March 18, 2014. JDK 8 was supposed to be released last September 2013 but was delayed to work on its security issues and other bugs.

The following are some of the features and improvements of JDK 8 mentioned in an article published at Oracle’s website:

Java Programming Language: Introduction of a new language feature calledLambda Expressions which let you express instances of single-method interfaces more compactly.

Collections: Performance Improvement for HashMaps with Key Collisions.

Compact Profiles contain predefined subsets of the Java SE platform and enable applications that do not require the entire Platform to be deployed and run on a small devices.

Security enhancements such as: Client-side TLS 1.2 enabled by default; stronger algorithms for password-based encryption; SSL/TLS Server Name Indication (SNI) Extension support in JSSE Server; SHA-224 Message Digests; 64-bit PKCS11 for Windows; New rcache Types in Kerberos 5 Replay Caching; and more.
JavaFX: The new SwingNode class enables developers to embed Swing content into JavaFX.

New Tools: jjs command is provided to invoke the Nashorn engine;java command launches JavaFX applications; java man page has been reworked; jdeps command-line tool is provided for analysing class files; Java Management Extensions (JMX) provide remote access to diagnostic commands; jarsigner tool has an option for requesting a signed time stamp from a Time Stamping Authority (TSA); and improved Javac tool.
Internalization: Unicode Enhancements, including support for Unicode 6.2.0; Adoption of Unicode CLDR Data and the java.locale.providers System Property. New Calendar and Locale APIs; and Ability to Install a Custom Resource Bundle as an Extension.

Deployment: The permission attribute is required in the JAR file manifest of the main JAR file at all security levels.

Date-Time Package: a new set of packages that provide a comprehensive date-time model.

Scripting: Nashorn Javascript Engine.

Pack200: Pack200 Support for Constant Pool Entries and New Bytecodes Introduced by JSR 292.

IO and NIO: Decrease in the size of the /jre/lib/charsets.jar file.

Java.lang and java.util Package: Parallel Array Sorting; Standard Encoding and Decoding Base 64; and Unsigned Arithmetic Support.

JDBC: The JDBC-ODBC Bridge has been removed.

Java DB: Java DB 10.10 included.

Networking: The class java.net.URLPermission has been added.

Concurrency: Classes and interfaces have been added to the java.util.concurrent package.

Java XML – JAXP.

HotSpot: Default Methods in the Java Programming Language are supported by the byte code instructions for method invocation.

Java Mission Control 5.3 Release Notes: JDK 8 includes Java Mission Control 5.3.

Key features of Java 8 have also been presented in a webcast last March 25, 2014. Oracle also promoted the release of Java Platform, Standard Edition (SE 8), Java Platform, Micro Edition 8 (ME 8) and other Java Embedded products during the webcast. Over 30 technical videos of Java SE 8, Java ME 8, Java Embedded and the Internet of Things are now available at Oracle’s website.