`

怎么在App Engine中使用JDBC?

阅读更多

jiql是一个在App Engine上使用的JDBC包装器,使用它可以让我们的Java程序在GAE上支持JDBC访问。

以下是管方教程,来自于http://www.jiql.org/xwiki/bin/view/Main/

jiql is a Java JDBC wrapper for Cloud computing databases. The database is accessed via the jiql jdbc client. The data is actually stored in a cloud-baseddata store, such as Google's BigTable .

http://www.jiql.org/xwiki/resources/diagram.png


The fact is Google App Engine for Java at present only supports JDO and JPA as standard protocols for data persistence. However many Java programmers are used to JDBC as the preferred protocol. Applications requiring JDBC support can now turn to jiql. jiql is a JDBC wrapper of the lower level Google DataStore APIs thus providing a familiar way to utilize Google's BigTable.

So a Java application, using standard JDBC calls to the jiql JDBC client, is able to store critical data in GBT. As the DataStore sits in the cloud, you essentially have a solution for distributed database access.

FEATURES HIGHLIGHTS : JDBC . SQL . REMOTE ACCESS
Run PHP with jiql on GAE new
Run JRuby-on-RAILS with jiql on GAE new

How to start

jiql is in its early stages of Development. (We put out a new build almost daily).The present release is 0.1.44 (08/14/2009 ) . Not all features have been implemented as yet. Below are the steps to try out jiql :

  • Download jiql.jar java database engine and driver library and place under WEB-INF/lib/
  • Download jiql.jsp JSP file and place under ./ of your java application.
  • NOTE : The appengine-api.jar must also be placed under WEB-INF/lib. This file comes with the GAE SDK.
  • Edit jiql.jsp accordingly.
  • Test jiql with the jiql.jsp

Or test with the jdbc-guestbook application. The jdbc-guestbook application is a

JDBC based version of the Google Guestbook application.
Download jdbc-guestbook.war here . When installed, you must first call
init.jsp. This will create the "Greeting" table. When this step is completed,
you may then browse guestbook.jsp.
For the jdbc-guestbook source code, you may download jdbc-guestbook.src.zip here .

(NOTE for those folks without a GAE-for-JAVA account, you can download the GAE JAVA SDK and use as a test environment)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics