如何使Java Web应用程序脱机?

时间:2023-01-19 22:16:08

We develop Java Web-aps (Websphere, DB2) which display graphical and databased information. We would also like to offer the same application offline (distribution via CD/DVD) with online data-update. We have tried a number of alternatives in the past, but nothing has been really stable. What are the new best practices to take a Web ap plus data (in a small database) offline?

我们开发了Java Web-aps(Websphere,DB2),它显示了图形和数据库信息。我们还希望提供相同的应用程序离线(通过CD / DVD分发)和在线数据更新。过去我们尝试了很多替代品,但没有什么比这更稳定了。将Web ap +数据(在小型数据库中)脱机的新的最佳实践是什么?

4 个解决方案

#1


2  

I don't know how well it works with the CD/DVD distribution front, but the first thing that comes to mind is Gears. On the .NET side of the fence there's Silverlight 2. Then there's the Mozilla Prism project, although I don't know how far advanced that is.

我不知道它在CD / DVD发行方面的效果如何,但首先想到的是Gears。在围栏的.NET一侧有Silverlight 2.然后就是Mozilla Prism项目,虽然我不知道它有多远。

These are all designed for not just offline access, but mixed offline/online, talking to a server when it's available and working locally when necessary.

这些都是为了不仅脱机访问而设计的,而是离线/在线混合,在服务器可用时与服务器通信,并在必要时在本地工作。

#2


1  

I'd suggest using Apache Derby as the database (also available as Sun's Java DB, and possibly still IBM Cloudscape (does that still have DB2 compatibility in place?)).

我建议使用Apache Derby作为数据库(也可以作为Sun的Java DB,也可能是IBM Cloudscape(它仍然具有DB2兼容性吗?))。

I'm sure there's plenty of Web servers/Servlet containers about. Apache Tomcat is the obvious one. An alternative approach would be to use an embedded native browser within a single Java process. That approach should be relatively hassle free for users and tech support, and you can just use WebStart to install and update.

我确定有很多Web服务器/ Servlet容器。 Apache Tomcat是显而易见的。另一种方法是在单个Java进程中使用嵌入式本机浏览器。对于用户和技术支持而言,这种方法应该相对轻松,您可以使用WebStart进行安装和更新。

If you're using EJBs and other nonsense, then there are similar freebies about. I understand Sun Glassfish is nice and fast starting.

如果您正在使用EJB和其他废话,那么有类似的免费赠品。我知道Sun Glassfish很好,速度很快。

#3


0  

You could create an image of your server as a VMware instance and distribute it with a copy of VMware player (licensing allowing of course). Personally I'd build it on top of a Linux distribution like CentOS5.

您可以将服务器的映像创建为VMware实例,并使用VMware播放器的副本进行分发(当然允许许可)。就个人而言,我会在像CentOS5这样的Linux发行版上构建它。

#4


0  

You can bundle a JRE along with JETTY server and use a different database e.g HSQLDB (that you can bundle inside the webapp itself).

您可以将JRE与JETTY服务器捆绑在一起,并使用另一个数据库,例如HSQLDB(您可以在Web应用程序内部捆绑)。

If you are using an ORM tool to connect to database, you might not have to make many code changes for this.

如果您使用ORM工具连接到数据库,则可能不必为此进行许多代码更改。

A lot of Application server distribute their admin consoles like this.For e.g Weblogic admin console runs offline (it uses internal ldap server for its database)

许多应用服务器像这样分发他们的管理控制台。例如,Weblogic管理控制台脱机运行(它为其数据库使用内部ldap服务器)

Also as far as Google gears is concerned, they are also pretty much doing the same thing. They have a server that is bundled along with SQLDB and they allow to synchronize the data between online offline app. You can sync the data too (use webservices in the online app) and talk over https from the offline app to sync the data, if you need the sync feature.

另外就谷歌的齿轮而言,他们也在做同样的事情。他们有一个与SQLDB捆绑在一起的服务器,它们允许在线脱机应用程序之间同步数据。如果您需要同步功能,您也可以同步数据(使用在线应用程序中的webservices)并通过离线应用程序中的https进行通话以同步数据。

Also you can check this link http://developers.sun.com/learning/javaoneonline/2007/pdf/TS-69700.pdf

您也可以查看此链接http://developers.sun.com/learning/javaoneonline/2007/pdf/TS-69700.pdf

#1


2  

I don't know how well it works with the CD/DVD distribution front, but the first thing that comes to mind is Gears. On the .NET side of the fence there's Silverlight 2. Then there's the Mozilla Prism project, although I don't know how far advanced that is.

我不知道它在CD / DVD发行方面的效果如何,但首先想到的是Gears。在围栏的.NET一侧有Silverlight 2.然后就是Mozilla Prism项目,虽然我不知道它有多远。

These are all designed for not just offline access, but mixed offline/online, talking to a server when it's available and working locally when necessary.

这些都是为了不仅脱机访问而设计的,而是离线/在线混合,在服务器可用时与服务器通信,并在必要时在本地工作。

#2


1  

I'd suggest using Apache Derby as the database (also available as Sun's Java DB, and possibly still IBM Cloudscape (does that still have DB2 compatibility in place?)).

我建议使用Apache Derby作为数据库(也可以作为Sun的Java DB,也可能是IBM Cloudscape(它仍然具有DB2兼容性吗?))。

I'm sure there's plenty of Web servers/Servlet containers about. Apache Tomcat is the obvious one. An alternative approach would be to use an embedded native browser within a single Java process. That approach should be relatively hassle free for users and tech support, and you can just use WebStart to install and update.

我确定有很多Web服务器/ Servlet容器。 Apache Tomcat是显而易见的。另一种方法是在单个Java进程中使用嵌入式本机浏览器。对于用户和技术支持而言,这种方法应该相对轻松,您可以使用WebStart进行安装和更新。

If you're using EJBs and other nonsense, then there are similar freebies about. I understand Sun Glassfish is nice and fast starting.

如果您正在使用EJB和其他废话,那么有类似的免费赠品。我知道Sun Glassfish很好,速度很快。

#3


0  

You could create an image of your server as a VMware instance and distribute it with a copy of VMware player (licensing allowing of course). Personally I'd build it on top of a Linux distribution like CentOS5.

您可以将服务器的映像创建为VMware实例,并使用VMware播放器的副本进行分发(当然允许许可)。就个人而言,我会在像CentOS5这样的Linux发行版上构建它。

#4


0  

You can bundle a JRE along with JETTY server and use a different database e.g HSQLDB (that you can bundle inside the webapp itself).

您可以将JRE与JETTY服务器捆绑在一起,并使用另一个数据库,例如HSQLDB(您可以在Web应用程序内部捆绑)。

If you are using an ORM tool to connect to database, you might not have to make many code changes for this.

如果您使用ORM工具连接到数据库,则可能不必为此进行许多代码更改。

A lot of Application server distribute their admin consoles like this.For e.g Weblogic admin console runs offline (it uses internal ldap server for its database)

许多应用服务器像这样分发他们的管理控制台。例如,Weblogic管理控制台脱机运行(它为其数据库使用内部ldap服务器)

Also as far as Google gears is concerned, they are also pretty much doing the same thing. They have a server that is bundled along with SQLDB and they allow to synchronize the data between online offline app. You can sync the data too (use webservices in the online app) and talk over https from the offline app to sync the data, if you need the sync feature.

另外就谷歌的齿轮而言,他们也在做同样的事情。他们有一个与SQLDB捆绑在一起的服务器,它们允许在线脱机应用程序之间同步数据。如果您需要同步功能,您也可以同步数据(使用在线应用程序中的webservices)并通过离线应用程序中的https进行通话以同步数据。

Also you can check this link http://developers.sun.com/learning/javaoneonline/2007/pdf/TS-69700.pdf

您也可以查看此链接http://developers.sun.com/learning/javaoneonline/2007/pdf/TS-69700.pdf