Friday May 29, 2009

Java DB 10.5.1 now available

The Java DB project is pleased to announce a new feature release of Java DB 10.5.1.

Java DB is Sun's branded distribution of the Apache Derby open source  database. Java DB is a pure Java relational database engine which conforms to the ISO/ANSI SQL and JDBC standards. Java DB aims to be easy for developers and end-users to work with.

Java DB 10.5.1 can be obtained from the Java DB download site:

Java DB 10.5.1 introduces the following new features and improvements:

  • In-memory databases for test rigs and transient data
  • Replication of Encrypted Data for failover of sensitive databases
  • OFFSET/FETCH FIRST for paging through query results efficiently
  • SQL Roles for administering fine-grained access controls
  • Generated Columns for speeding up queries by pre-computing results
  • LOB Improvements for speeding up access to large binary and text objects
  • Optimizer Statistics Improvements for better management of query plans

Java DB offers the following: 

  • Installers for various platforms
  • Support offering (more info)
  • Notification of new releases and updates via registration
  • Native Netbeans integration
  • Bundled in GlassFish and Sun JDK6
If you are interested in learning more or/and sharing feedback about Java DB, please come and visit us at our POD during CommunityOne and JavaOne 2009.

Sunday Nov 09, 2008

Java DB and GlassFish v3 Prelude

GlassFish v3 Prelude launched recently and bundles Java DB, Sun's supported version of Apache Derby.

As you may already know, GlassFish v3's foundations are based on HK2, some Hundred Kilobytes Kernel with a module subsystem and component model that can run on top of OSGI.

Java DB modular architecture is similarly based on modules and services components and can also run as an OSGI bundle. Both GlassFish and Java DB can run embedded in some Java framework or as standalone applications in their own JVM process.

I thought I would highlight how you can get Java DB running in one command and start using it. Note that there is no change as far as how Java DB is run with previous versions of GlassFish.

To start a GlassFish server instance:
\*\* Hint: First make sure to set JAVA_HOME environment variable to point to Sun JDK6 root installation directory.
> cd glassfishv3-prelude (or wherever directory you have installed GlassFish)
> bin\\asadmin start-domain (to start the default domain instance)

Then all you have to do to start Java DB as a standalone server process is:
> bin\\asadmin start-database

Database started in Network Server mode on host and port 1527.
--------- Derby Network Server Information --------
Version: CSS10020/ - (538595)  Build: 538595  DRDA Product Id: CSS10020
-- listing properties --

Now, that GlassFish and Java DB have been started, you can test a ping connection via the GlassFish Administration console at:

Navigate to Resources> JDBC> Connection Pools> DerbyPool
which is a pre-defined sample JDBC connection pool.

You will be able to ping the running Java DB instance by clicking on the Ping button.

It will create some sun-appserv-samples GlassFish sample database by default under glassfishv3-prelude\\glassfish\\databases directory and derby.log will also be under that same location.

That's it. You can now access the sample database via the JDBC sample DerbyPool connection pool from your application.

You could also connect via IJ, Java DB's command-line tool as follows:
> set DERBY_INSTALL=C:\\glassfishv3-prelude\\javadb
> cd glassfishv3-prelude
> javadb\\frameworks\\NetworkServer\\bin\\ij
> ij version 10.2
   ij> connect 'jdbc:derby://localhost:1527/sun-appserv-samples;user=APP;password=APP';
   ij> select count(\*) COUNT from sys.systables;
   ij> exit;

To stop Java DB, simply run:
> bin\\asadmin stop-database
Connection obtained for host:, port number 1527.
Apache Derby Network Server - - (538595) shutdown at 2008-11-09 08:48:43.312 GMT
Command stop-database executed successfully.

More information about GlassFish's admin start-database and stop-database commands.

Thursday Jan 24, 2008

The Three Database Musketeers: MySQL, PostgreSQL and Java DB

As you probably have heard already, Sun Microsystems has announced an agreement to acquire MySQL.

I have had several people asking me about my view on it and I thought I would offer it here, along with an analogy.

First of all, being part of the Database Technology Group at Sun, I'm very happy that Sun has entered into an agreement to acquire MySQL, the #1 open source relational database system.

Sun is one of the biggest open source contributors and it only made sense that eventually Sun would acquire MySQL to offer its users base various alternatives for their database needs.

Sun will now support 3 major database open source initiatives as MySQL, PostgreSQL and Apache Derby (Java DB).

As Jonathan Schwartz mentions it here in his blog, "This transaction increases our investment in open source, and in open source databases. And increases our commitment to Postgres - and the database industry broadly. The same goes for our work with Apache Derby, and our Java DB."

As far as the analogy with The Three Musketeers, I see these three databases as the database musketeers which are going to be working together, with each of them having very particular and unique capabilities that will satisfy various needs in the entreprise, such as embeddable Java store, data wharehousing, OLTP, Web 2.0, etc. Now I will let you guess who plays the role of D'Artagan and no, don't even go there with Richelieu ;-)

In reality, databases are not one size fits all and it is good to have choices and alternatives for the various applications' requirements out there. So the database musketeers's motto here won't be "One for all, all for one", but rather  "No one size fits all", otherwise one could end-up with something like this (joke aside).

Anyhow, here at Sun we're very excited in having MySQL being part of the adventure.

Thursday Mar 08, 2007

Sun’s Open Source Contribution: $2 Billion, Dozens of Projects and Yes that includes Apache Derby

A nice spotlight on Open Source and Sun's contribution. Dan Roberts, Director of Marketing at Sun, chats with Simon Phipps, Sun’s chief open source officer.

"Did you know that Sun contributes more than $200 million per year of intellectual property to the open source movement, in dozens of open source projects? The company’s historical contribution tops $2 billion."

You can also find more about Sun's Free and Open Source initiatives at

Java DB (Sun's supported distribution of Apache Derby) is one of the projects I'm proud to work on.

Tuesday Mar 06, 2007

Migrating Your Application to Use Java DB

In this article, a web application that was developed using the Pointbase database is migrated to use Java DB. The web application was originally developed in the NetBeans 4.1 integrated development environment (IDE).

Java DB is Sun Microsystem's supported distribution of the Apache Derby 100% Java database. IF you are using JDK 6, Java DB is included as part of this last one. You can also download the Sun Java System Application Server, which includes Java DB.

When registering the application server in NetBeans 5.5, Java DB will be automatically registered as well. Alternatively, you can download the Java EE 5 Tools Bundle, which includes both the NetBeans IDE and Sun Java System Application Server.. Java DB is fully transactional, secure, and compliant with the JDBC, SQL, and J2EE standards.

Sunday Mar 04, 2007

Sun releases Java Enterprise System 5.0 with Java DB (based on Apache Derby)

"Java ES (Enterprise System) already includes Java DB, Sun's supported distribution of the open-source Apache Derby database. The middleware also supports the PostgreSQL open-source database.

Sun now lays claim to more than 1.3 million subscribers for Java ES compared to the nearly 1 million it declared in October 2005."

Monday Feb 26, 2007

Derby Embedded w/ Eclipse

To follow-up on the Java DB / Apache Derby with Netbeans blog entry that I recently posted, here is another user experience from Paweł Piotrowski who used Eclipse (IDE) to access Derby in embedded mode.

Wednesday Feb 07, 2007

ActiveMQ graduates from Apache Incubator and uses Apache Derby

Apache ActiveMQ Open Source Message Broker has now graduated to become a top level project (TLP) at Apache! Congratulations to the ActiveMQ community!

To achieve high performance of durable messaging, ActiveMQ embeds and uses Apache Derby (configured by default), to allow for some very fast persistence via JDBC, coupled along with ActiveMQ's high performance journal.




« July 2016