从一个开发服务器提供多个GAE模块? [英] Serving multiple GAE modules from one development server?

查看:160
本文介绍了从一个开发服务器提供多个GAE模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将一些后端转换为模块,并且对设置开发环境配置感到困惑。我在Eclipse中使用Java,但不使用Maven。架构非常简单:

I'm converting some backends to modules and am perplexed on setting up the development environment configuration. I'm using Java in Eclipse but not Maven. The architecture is very simple:


  • 前端模块是默认的。基本GAE / GWT应用程序将项目放在任务队列上。

  • 后端模块处理任务队列。

后端架构一个调试配置将启动开发服务器,该服务器将为后端任务处理服务GWT DevMode UI和。

With the old backend architecture one debug configuration would start up the development server that would service the GWT DevMode UI and the backend task processing.

问题是DevMode的参数提供了一个-war命令行参数。现在我们不再有一个单一的战争文件(有一个包含两个战争文件的耳朵),我们必须独立启动它们。这很好,我们可以创建一个启动前端和后端的启动组。

The crux of the issue is that the arguments to DevMode provide for a -war command line argument. Now that we no longer have a single war file (there is an ear containing two war files), we have to start them independently. This is fine, we can create a Launch Group that starts up the frontend and backend.

问题是每个war文件都获得它自己的
WEB-INF /appengine-generated/local_db.bin,它基本上创建了两个独立的应用程序。我在这里遗漏了什么吗?我需要能够在处理新后端中的任务队列项目的servlet中的前端RPC服务上放置一个断点,并且在两个调试会话中都打了两个。

The problem is that each war file gets it's own WEB-INF/appengine-generated/local_db.bin, which essentially creates two standalone applications. Am I missing something here? I need to be able to put a breakpoint on my front-end RPC service and in the servlet that handles task queue items in the new backend and have both of them hit in one debugging session.

感谢任何想法。

推荐答案

如果您遵循说明这里,这将在Eclipse中创建一个模块化的应用程序结构,而不是使用Maven。您将需要Eclipse WTP才能使所需的项目类型可用(Enterprise Application Project和Dynamic Web Project)。

If you follow the instructions here, this will create a modularized application structure in Eclipse, and not using Maven at all. You will need Eclipse WTP in order to have the required project types available (Enterprise Application Project and Dynamic Web Project).

Eclipse项目结构应如下所示: p>

The Eclipse project structure should look as follows:

<<Enterprise Application Project>> ear-app
    |
    | (refers to)
    |
<<Dynamic Web Project>> app-module-1  "default"
<<Dynamic Web Project>> app-module-2  "any_name_2"
<<Dynamic Web Project>> app-module-3  "any_name_3"
<<Dynamic Web Project>> app-module-4  "any_name_4"

name的值是指module元素在appengine-web.xml中,物理Web项目可以有任何名称。

The value of "name" refers to the "module" element in appengine-web.xml, while the physical web project can have any name.

请注意,您需要切换到J2EE透视图才能使用GPE WTP菜单选项可用,它们不会显示在标准的Java透视图中。

Please note that you need to switch into J2EE perspective in order to have the GPE WTP menu options available, they do not show up in the standard Java perspective.

接下来,您需要将EAR项目链接到新的本地服务器实例(Google App类型引擎)。

Next, you need to link the EAR project to a new local server instance (of type "Google App Engine").

只有其中一个Web模块必须在appengine-web.xml中标记为默认值。

Only one of the web modules must be flagged as "default" in appengine-web.xml.

将EAR部署到本地服务器后,数据存储位置位于默认 Web模块的WEB-INF / appengine-generated / local_db.bin中,它在Web之间共享模块。

Upon deployment of the EAR to the local server, the datastore location is in WEB-INF/appengine-generated/local_db.bin of the default web module, and it is shared between the web modules.

这篇关于从一个开发服务器提供多个GAE模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆