JDK Feature
J2SE 1.4
•Assert keyword
•Regular expressions
•Exception chaining (allows an exception to encapsulate original lower-level exception)
•Internet protocol version 6 (IPV6) support
•Non-blocking nio (new input/output)
•Logging API
•Image i/o api for reading and writing images in formats like jpeg and png
•Integrated XML parser and XSLT processor (JAXP)
•Integrated security and cryptography extensions (JCE, JSSE, JAAS)
•Java web start
J2SE 5.0
•Generics: provides compile-time (static) type safety for collections and eliminates the need for most typecasts (type conversion).
•Metadata: also called annotations; allows language constructs such as classes and methods to be tagged with additional data, which can then be processed by metadata-aware utilities.
•Autoboxing/unboxing: automatic conversions between primitive types (such as int) and primitive wrapper classes (such as integer).
•Enumerations: the enum keyword creates a typesafe, ordered list of values (such as day.monday, day.tuesday, etc.). Previously this could only be achieved by non-typesafe constant integers or manually constructed classes (typesafe enum pattern).
•Swing: new skinnable look and feel, called synth.
•Var args: the last parameter of a method can now be declared using a type name followed by three dots (e.g. Void drawtext(string... Lines)). In the calling code any number of parameters of that type can be used and they are then placed in an array to be passed to the method, or alternatively the calling code can pass an array of that type.
•Enhanced for each loop: the for loop syntax is extended with special syntax for iterating over each member of either an array or any iterable, such as the standard collection classesfix the previously broken semantics of the java memory model, which defines how threads interact through memory.
•Automatic stub generation for rmi objects.
•Static imports concurrency utilities in package java.util.concurrent.
•Scanner class for parsing data from various input streams and buffers.
•Assertions
•StringBuilder class (in java.lang package)
•Annotations
J2SE 6.0
•Scripting
•Web Services
•Database (JDBC 4.0, Java DB)
•More Desktop APIs
•Monitoring and Management
•Compiler Access
•Pluggable Annotations
•Desktop Deployment
•Security
•Quality, Compatibility, Stability
JDBC Feature
JDBC 3.0
•Reusabilty of prepared statements by connection pools.
•In this version there is number of properties defined for the ConnectionPoolDataSource. These properties can be used to describe how the PooledConnection objects created by DataSource objects should be pooled.
•A new concept has been added to this API is of savepoints: One of the useful new features is transactional savepoints. With JDBC 3.0, the transactional model is now more flexible. Now you can start a transaction , insert several rows in it and then create a savepoint. This savepoint serves as a bookmark. The application can rollback to the savepoint and then commit the group of inserts as if the updates have never been attempted. For eg:
Statement st=connection.createStatement();
int rowcount=st.executeUpdate("insert into employee values("tim"));
int rowcoutn=st.executeUpdate("insert into salary values(20000.0);
Savepoint sv=connection.setSavePoint("savepoint"); //create save point for inserts
int rowcount=st.executeUpdate("delete from employee");
connection.rollback(sv); //discard the delete statement but keeps the inserts
connection.commit(); //inserts are now permanent
•Retrieval of parameter metadata.
•It has added a means of retrieving values from columns containing automatically generated values.
•Added a new data type i.e. java.sql.BOOLEAN.
•Passing parameters to CallableStatement.
•The data in the Blob and Clob can be altered: JDBC 3.0 introduces a standard mechanism for updating BLOB and CLOB data.
•DatabaseMetaData API has been added.
•It allows stored procedure parameters to be called by name.
JDBC 4.0
JDBC 4 is a major new release with a strong focus ease-of-use and programmer productivity. JDBC 4's key priority is to make it easier for developers to work directly with the JDBC API. The new features availble in J2SE 1.5 added ease-of-development features in JDBC 4.In addition to ease-of-use, JDBC 4 introduces several SQL 203 features, like Java specific mapping for the new XML SQL type. Now in JDBC 4 every PreparedStatement is poolable by default.
•Auto- loading of JDBC driver class: In JDBC 4 invoking the getConnection() on DriverManager will automatically load a driver. Upon loading the driver, an instance of the driver is created and the registerDriver() method is invoked to make that driver available to clients.
•Connection management enhancements: In jdbc it may happen that a Connection is lying idle or not closed in a pool, then it became stale over time. This will led to the connection pool run out of resources due to stale connection. We know that the stale connection doesn't mean that a connection is closed. Now in JDBC 4 Connection class we have provided one method isValid(), which allows a client to query the database driver if a connection is still valid. As database is a shared resource, so many application can access the same data store. To maintain all the records of the client is a difficult task, now in JDBC 4 an application can associate metadata with a database connection via the setClientInfo() method, which takes a name/value pair, or a Properties object.
•Support for RowId data type: JDBC introduces support for ROWID, a data type that had been in use in database products even before it became part of the SQL.
•SQL exception handling enhancements: JDBC 4 addresses the error handling beautifully. As databases are often remotely accessible resources, problems such as network failures is common and it can cause exceptions when executing a database operation. SQL statements can also cause exceptions. Prior to JDBC 4, most JDBC operations generated a simple SQLException.
•SQL XML support:
•DataSet implementation of SQL using Annotations: The JDBC 4.0 specification leverages annotations to allow developers to associate a SQL query with a Java class without a need to write a lot of code to achieve this association.