简体   繁体   English

Google应用引擎是否支持JDBC?

[英]Does Google app engine supports JDBC?

I have heard the Google App Engine[java] do not support JDBC and Hibernate. 我听说Google App Engine [java]不支持JDBC和Hibernate。 Is it true? 这是真的吗?
If yes then how do we access the database in Google App Engine. 如果是,那么我们如何在Google App Engine中访问数据库。

Also, is there any [basic] sample application which can help me understand how to perform CRUD operations in GAE. 此外,是否有任何[基本]示例应用程序可以帮助我了解如何在GAE中执行CRUD操作。

JDBC and Hibernate are not supported: http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine 不支持JDBC和Hibernate: http//groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine

I'm currently learning app engine too. 我目前正在学习app引擎。 Here's some resources and projects that have been helpful: 这里有一些有用的资源和项目:

http://code.google.com/appengine/docs/java/overview.html http://code.google.com/appengine/docs/java/overview.html

http://groups.google.com/group/google-appengine-java http://groups.google.com/group/google-appengine-java

Springsource Tool Suite is shipped with the Google Plugin for Eclipse (GPE): http://www.springsource.com/products/sts Springsource Tool Suite附带了Google Plugin for Eclipse(GPE): http//www.springsource.com/products/sts

A non-trivial web app example (spring mvc/gwt/jsf + JDO + spring IOC, service layer, DAOs, DTOs, test suite): http://code.google.com/p/swagswap/ 一个非平凡的Web应用程序示例(spring mvc / gwt / jsf + JDO + spring IOC,服务层,DAO,DTO,测试套件): http//code.google.com/p/swagswap/

Google uses their own type of Datastore for GAE apps. Google为GAE应用使用自己的数据存储类型。 Here is there documentation for how it works: http://code.google.com/appengine/docs/java/datastore/overview.html . 以下是有关其工作原理的文档: http//code.google.com/appengine/docs/java/datastore/overview.html That page has examples of how it works. 该页面提供了有关其工作原理的示例。

AppEngine doesn't use a relational database. AppEngine不使用关系数据库。 You should really read the docs about how AppEngine works, starting with this Java-oriented overview of AppEngine . 您应该真正阅读有关AppEngine如何工作的文档,从这个面向Java的AppEngine概述开始。

AppEngine delivers on its scalability promise by leveraging Google-style infrastructure. AppEngine利用Google风格的基础架构实现其可扩展性承诺。 If you're looking to use a more traditional stack, you'll probably be better off with Amazon EC2 . 如果您希望使用更传统的堆栈,那么使用Amazon EC2可能会更好。

Yes, that's true. 是的,这是真的。 JDBC drivers won't work there, as long as GAE datastore is not based on RDBMS (it's rather some kind of NoSQL big-table storage). 只要GAE数据存储不是基于RDBMS(它是某种NoSQL大表存储),JDBC驱动程序就无法在那里工作。
If you want to work with GAE storage via ActiveRecord ORM (Hibernate-like), you may be interested in JPA or JDO - the both are supported. 如果您想通过ActiveRecord ORM(类似Hibernate)使用GAE存储,您可能对JPA或JDO感兴趣 - 两者都受支持。 Alternatively, you can directly use low-level API. 或者,您可以直接使用低级API。

For more information you may refer to Datastore Java API Overview . 有关更多信息,请参阅数据存储Java API概述

There is an early-stage 3rd party project to build a JDBC driver for the App Engine nonrel datastore: 有一个早期的第三方项目为App Engine非数据存储区构建JDBC驱动程序:

http://www.jiql.org/xwiki/bin/view/Main/ http://www.jiql.org/xwiki/bin/view/Main/

Storing data in a scalable web application can be tricky. 在可伸缩的Web应用程序中存储数据可能很棘手。

You have to use their datastore API. 您必须使用他们的数据存储API。 http://code.google.com/appengine/docs/java/gettingstarted/usingdatastore.html http://code.google.com/appengine/docs/java/gettingstarted/usingdatastore.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM