如何在 JBoss AS 5 和 6 中创建自己的服务器配置文件
我使用 JBoss AS 5 + 6 作为应用程序服务器,但仅作为带有ear 和war 部署的简单EJB3/Web 容器,但没有特殊功能,例如集群、ejb2 或hornetq。
JBoss AS 提供了用于不同用途的服务器配置文件,但我没有找到任何有关如何创建自己的配置文件或自定义现有配置文件的文档。如何才能实现这一目标?它在互联网上的哪里记录?
I am using JBoss AS 5 + 6 as an application server, however only as a simple EJB3/Web container with ear and war deployment but without special capabilities such as clustering, ejb2 or hornetq.
JBoss AS provides server profiles for different uses but I did not find any documentation on how to create my own or customize an existing profile. How can this be achieved? And where is it documented on the internet?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想创建自己的配置文件,则必须创建自己的配置文件,它可以基于标准 JBoss 配置文件之一:
minimal
或default
(如果您想要集群,您可以也可以使用all
或生产
配置文件)。如果您选择
minimal
配置文件,则必须将必要的服务复制到其中(例如从default
配置文件)。您必须记住配置文件、部署程序等。如果您选择
默认
配置文件,您可以简单地删除不必要的服务。在我看来,删除某些服务要容易得多。
最重要的一点:有 JBoss 文档,您必须从配置文件中删除才能禁用给定服务: JBoss 5 .x 调整/瘦身。
If you want create your own profile you have to create your own profile, which can base on one of the standard JBoss profiles:
minimal
ordefault
(if you want clustering you can also useall
orproduction
profile).If you choose
minimal
profile you have to copy necessary services to it (for example fromdefault
profile). You have to remember about config files, deployers and so on.If you choose
default
profile you have simple remove unnecessary services.In my opinion it is much easier to remove some services.
And the most important point: there is JBoss documentation what you have to remove from profile to disable given service: JBoss 5.x Tuning/Slimming.
我还没有看到任何关于此的文档,因为我不确定这是你真正应该做的事情。
话虽如此,我已经这样做很多年了,而且它对我来说非常有效:)
不过,这有点是一个偶然的任务。您需要浏览
deploy
和deployers
目录,删除不需要的任何服务或部署程序。不过,您会发现它们彼此之间具有相互依赖性,并且并不总是很明显什么依赖于什么。一次获取一个 - 从现有配置文件(例如
default
)开始,将其复制(例如到myprofile
),然后从删除一项不需要的内容开始(例如deploy/messaging
目录),然后使用该配置文件启动它(即run.bat -c myprofile
),并查看它是否启动正常。对您要删除的每项服务都尝试此操作。如果你删除它需要的东西,它会抱怨,并告诉你什么依赖于它。I haven't seen any documentation on this, because I'm not sure it's something you're really supposed to do.
Having said that, I've been doing it for years, and it works great for me :)
It's a bit of a hit-and-miss task, though. You need to go through the
deploy
anddeployers
directories, removing any services or deployers that you don't need. You'll find that they have inter-dependencies on one another, though, and it's not always obvious what depends on what.Take it one at a time - start with an existing profile (e.g.
default
), copy it (e.g. tomyprofile
), then start by removing one thing you don't need (e.g. thedeploy/messaging
directory), then start it up with that profile (i.e.run.bat -c myprofile
), and see if it starts up OK. Try this with each service you want to remove. If you removing something it needs, it'll complain, and tell you what depends on it.