db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "JavaMESupport" by JohnHEmbretsen
Date Mon, 26 Nov 2007 15:32:09 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by JohnHEmbretsen:

The comment on the change is:
New page about Java ME and Derby

New page:
= Using Derby on Java ME platforms =

This page describes Derby's support for [http://java.sun.com/javame/index.jsp Java ME] (also
known as J2ME) environments, provides hints about how to use Derby in such environments, and
links to more information.


== Requirements ==
You can run Derby on a small device (such as a PDA or cell phone) which supports a Java ME
environment with the following minimum specifications:
 * Connected Device Configuration (CDC) 1.1
 * Foundation Profile (FP) 1.1
 * JSR 169: JDBC Optional Package for CDC/Foundation Profile

If your Derby version is older than version, Java ME is not supported at all. If
you have a version of Derby that is newer than, but older than, CDC/FP 1.0
is also supported. Note that there are some limitations imposed on Derby when run on a Java
ME platform, see the  [#dosc documentation] for details.

The fact that Derby supports the Foundation Profile means that other CDC profiles that are
supersets of FP, for example the Personal Basis Profile (PBP), are also supported.

Note that CLDC (Connected Limited Device Configuration) is currently ''not'' supported.

An overview of Java ME is [http://en.wikipedia.org/wiki/Java_ME available at Wikipedia].

== Documentation, Specifications and APIs ==

Derby's Java ME support is documented in...
 * the Jira issue tracking the initial implementation of CDC support in Derby: [http://issues.apache.org/jira/browse/DERBY-97
 * the Reference Guide: [http://db.apache.org/derby/docs/dev/ref/rrefjdbcjsr169.html JDBC
Package for Connected Device Configuration/Foundation Profile (JSR169)]
 * the Tools and Utilities Guide: [http://db.apache.org/derby/docs/dev/tools/rtoolsijproprefdatasource.html
ij.dataSource property]
 * the published API: [http://db.apache.org/derby/javadoc/publishedapi/jdbc3/org/apache/derby/jdbc/EmbeddedSimpleDataSource.html
(documentation links are to the alpha (development) version of the docs, see http://db.apache.org/derby/manuals/index.html
for specific versions)

Related Java ME specifications and APIs (Javadoc) include:
 * [http://jcp.org/en/jsr/detail?id=169 JSR-169] (JDBC Optional Package): [http://java.sun.com/javame/reference/apis/jsr169/index.html
API/spec (PUBLIC DRAFT)] (go to the JSR's home page to obtain the final release)
 * [http://jcp.org/en/jsr/detail?id=218 JSR-218] (CDC 1.1): [http://java.sun.com/javame/reference/apis/jsr218/
CDC 1.1.2 API]
 * [http://jcp.org/en/jsr/detail?id=219 JSR-219] (FP 1.1): [http://java.sun.com/javame/reference/apis/jsr219/
FP 1.1.2 API]
 * [http://jcp.org/en/jsr/detail?id=36 JSR-36] (CDC 1.0)
 * [http://jcp.org/en/jsr/detail?id=46 JSR-46] (FP 1.0)

== How to use Derby with a Java ME VM ==

JDBC for Java ME (JSR-169) does not include the {{{java.sql.Driver}}} or {{{java.sql.DriverManager}}}.
This means that you have to use the {{{javax.sql.DataSource}}} interface for accessing a Derby
database. Derby ({{{derby.jar}}}) includes a !DataSource implementation for Java ME environments:
EmbeddedSimpleDataSource]. Derby does not include client/server support for Java ME environments

Derby 10.3.2 and newer include a sample application showing how to create and access a database
in a Java ME environment: {{{SimpleMobileApp}}}. This application is available in the {{{demo/programs/simplemobile}}}
directory of Derby -bin installations. You can also view the source code from Derby's Subversion
repository [http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/simplemobile/SimpleMobileApp.java?view=markup

Derby databases are portable between Java ME and Java SE platforms, provided that databases
created or modified on a Java SE platform do not use features that are not supported by Derby
in a Java ME environment (such as encrypted databases or server-side procedures).

=== Using ij with a Java ME VM ===

Details to come...

== Java ME VMs tested with Derby ==

Derby users and developers have reported running Derby successfully on the following Virtual
Machines for Java ME / CDC:
 * [#phoneME phoneME Advanced]
 * [#j9 IBM's j9 (WCTME)]

=== phoneME Advanced ===
Details to come...

=== IBM's j9 Foundation (WCTME) ===
Details to come...

== Java ME Tips and tricks ==

If you are running Derby on a resource-constrained device and frequently run out of memory,
the following tips may help:
 * increase the amount of memory available to the VM, if possible (for example, some VMs support
the {{{-Xmx}}} option)
 * tune Derby's page cache ([http://www.nabble.com/Out-of-Memory-t1620472.html#a4396940 explained

If the VM you are using has never been tested against Derby, you may run into new issues,
such as Derby not properly recognizing your VM as a Java ME (JSR-169) environment. If you
see a problem that you don't know how to solve, post a question on the derby-user [http://db.apache.org/derby/derby_mail.html
mailing list].

You may also find useful information in previous mailing list topics by searching the archives,
for example [http://www.nabble.com/forum/Search.jtp?query=CDC&local=y&page=1&forum=93&daterange=0

View raw message