批处理 Java 帮助

发布于 2024-10-27 06:34:38 字数 501 浏览 3 评论 0原文

我的公司正在尝试确定实现批处理 Java 程序的最佳策略。我们有几百个(并且还在不断增长)独立的 Java 程序。其中大多数是单独的 Jasper 报告,但也有一些是较大的批量 Java 作业。目前,每个 Java 项目都使用 Eclipse 的导出选项打包为一个独立的 JAR 文件。然后,这些 JAR 会手动部署到我们的 Linux 服务器上并进行测试。如果它们通过了测试,就会通过 QA 向上迁移,并通过本地源代码控制系统迁移到生产环境。

这是执行批处理 Java 的最佳策略吗?持续的维护可能会很麻烦,因为搜索 Jar 文件并不容易,而且不同的开发人员每周都会创建新的 Java 项目(新报告)。

将现有项目从 Jar 文件导入 Eclipse 也是一个棘手的过程。我们希望这些事情变得更容易。我们考虑过将所有代码打包到 1 个大项目中,并编写一个接口,以便能够使用 Web 服务器执行所需的“包”(也称为程序)。

其他人/公司正在用他们的批处理 Java 程序做什么?在这方面有什么最佳实践吗?任何帮助/想法/工作模型将不胜感激。

My company is trying to determine the best strategy for implementing batch Java programs. We have a few hundred (and growing) separate Java programs. Most of them are individual Jasper Reports but some are bigger batch Java jobs. Currently, each Java Project is packaged an independent JAR file using Eclipse's export option. Those JARs are then deployed to our Linux server manually where they are tested. If they pass testing, they are then migrated up through QA and onto Production through a home grown source code control system.

Is this the best strategy for doing batch Java? Ongoing maintenance can be a hassle since searching Jar files is not easy and different developers are creating new Java Projects (new reports) every week.

Importing existing projects from the Jar files into Eclipse is a tricky process as well. We would like these things to be easier. We have thought about packaging all the code into 1 big project and writing an interface to be able to execute the desired "package" (aka program) maybe using a Web Server.

What are other people/companies doing out there with their batch Java programs? Are there any best practices out there on this stuff? Any help/ideas/working models would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夏尔 2024-11-03 06:34:38

我想说,您应该能够创建一个基于 Web 的应用程序来访问 Jasper 报告,而不是一堆批处理过程。然后,当您需要部署新报告时,只需部署一个小更新即可访问新编译的 Jasper 报告文件。

也就是说,您应该将代码而不是二进制文件检查到 Subversion 或 Git 存储库中。转储“自制”源代码控制存储库。生命太短暂,无法尝试在家种植这样的东西。只需使用 Git 或 Subversion,它们经过验证、简单且实用。当您导入新项目时,只需从 Subversion 中将其拉下来,不要尝试从 Eclipse IDE 导入 JAR 文件。

将 JAR 文件放入 Maven 存储库(例如 Nexus),然后从那里部署到 QA 和生产。为每个项目创建自动化构建(无论是使用 Maven 还是其他项目)。不要依赖 IDE 来导出 JAR 文件。 IDE 的更改以及从 IDE 的导出会带来更多人为错误的机会。此外,不同的开发人员会喜欢不同的 IDE。通过对 Maven 之类的东西进行标准化,您可以更加不受 IDE 的影响。

I would say that you should be able to create one web based app for access Jasper reports, rather than a bunch of batch processes. Then, when you need to deploy a new report, just deploy a minor update that accesses a new compiled Jasper report file.

That said, you should be checking your code, not your binaries, into a Subversion or Git repository. Dump the "home grown" source control repository. Life is too short to try to home grow stuff like that. Just use Git or Subversion, they're proven, simple, and functional. When you import a new project, just pull it down from Subversion, don't try to import the JAR file from your Eclipse IDE.

Put your JAR files into a Maven repository such as Nexus, and deploy to QA and Production from there. Create automated builds for every project (be that with Maven or something else). Don't depend upon an IDE to export your JAR files. IDE's change and exporting from an IDE introduces more opportunity for human error. Also, different developers will prefer different IDE's. By standardizing on something like Maven, you're a bit more IDE agnostic.

婴鹅 2024-11-03 06:34:38

Mhy 公司使用 IBM Websphere Extended Deployment 标准化了 Java Batch 执行。

这里 http://www.ibm.com/developerworks/websphere/techjournal/ 0801_vignola/0801_vignola.html是一篇介绍java批处理编程和部署技术的文章。

使用 WebSphere Extended Deployment Compute Grid 进行批量编程简介
Christopher Vignola,WebSphere
IBM 架构师

通常被认为是
传统“大型机”技术,批量
处理本身就是一个
受人尊敬的工作量风格,随着不断增长
Java™ 和分布式的需求
环境。本文介绍
Java 令人兴奋的新功能
来自领导者 IBM® 的批处理
在批处理系统中
过去 40 年。此内容是一部分
IBM WebSphere 开发人员技术
日记。

WebSphere 扩展部署计算
rid 提供了一个简单的抽象
批处理作业步骤及其输入和
输出。编程模型是
简洁且易于使用。
内置检查点/回滚
机制使构建变得容易
健壮、可重新启动的 Java 批处理
应用程序。

提供了批处理模拟器实用程序
本文提供了
运行的替代测试环境
在你的 Eclipse(或者 Rational
应用程序开发人员)开发
环境。它的 xJCL 生成器可以
帮助您进入下一阶段
计算网格单元中的测试
测试服务器。

但即使您对该产品不感兴趣,这篇文章仍然是必读的。

Mhy company has standardized Java Batch execution using IBM Websphere Extended Deployment.

Here http://www.ibm.com/developerworks/websphere/techjournal/0801_vignola/0801_vignola.html is an article introducing techniques for programming and deploying java batch.

Introduction to batch programming using WebSphere Extended Deployment Compute Grid
Christopher Vignola, WebSphere
Architect, IBM

Commonly thought of as a
legacy "mainframe" technology, batch
processing is showing itself to be a
venerable workload style with growing
demand in Java™ and distributed
environments. This article introduces
an exciting new capability for Java
batch processing from IBM®, the leader
in batch processing systems for the
last 40 years. This content is part of
the IBM WebSphere Developer Technical
Journal.

WebSphere Extended Deployment Compute
rid provides a simple abstraction of
a batch job step and its inputs and
outputs. The programming model is
concise and straightforward to use.
The built-in checkpoint/rollback
mechanism makes it easy to build
robust, restartable Java batch
applications.

The Batch Simulator utility provided
with this article offers an
alternative test environment that runs
inside your Eclipse (or Rational
Application Developer) development
environment. Its xJCL generator can
help jump start you to the next phase
of testing in the Compute Grid unit
test server.

But even if you are not interested in the product, the article is a must read anyway.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文