我可以使用 org.eclipse.wst.server.core 插件创建 websphere 服务器实例并进行配置吗?

发布于 2024-11-15 14:04:39 字数 1034 浏览 2 评论 0原文

我正在尝试以编程方式在 RSA 中的本地工作站中创建 websphere 服务器实例。我相信这可以使用 WSAdmin 脚本来完成。但我只是尝试使用可用的服务器 API 或插件之一来完成这项工作。它仍然是一个黑匣子,因为我不知道这是否可以实现。

“org.eclipse.wst.server.core”似乎有一组用于服务器操作的类,但我找不到任何东西来创建服务器实例。

我看到 IServerTypes.class 有很多服务器类型。

所有这些让我陷入了我们可以使用这个插件创建服务器实例的情况。

你们中的任何人都可以帮助我并阐明我正在进行的方式是否正确吗?或者这只能通过编写 WSAdmin 脚本并从 java 调用来完成?

谢谢。


我已经浏览过 JMX API,看起来它们有助于管理服务器,但对创建服务器实例没有帮助...我看到 API 用于配置已创建的服务器并收集配置数据来管理它们...

但是,我仍在尝试使用 eclipse 服务器插件,现在能够使用“org.eclipse.wst.server.core”插件单独创建服务器和配置文件,但我不知道如何将这些服务器添加到我创建的配置文件中...

我我还可以将 EAR 项目添加/部署到服务器创建并发布它们...这就是我创建服务器的方式..我没有在此处包含项目部署代码...

IServerType iServerType = ServerCore.findServerType("com.ibm.ws.ast.st.v7.server.base"); IServerWorkingCopy swc = iServerType.createServer("TestServer", null , monitor); 
swc.setName("TestServer"); 
IServer server = swc.save(true, monitor);

假设配置文件已经创建...我需要将配置文件添加到此 TestServer。 .

任何帮助..

如果这种方法不起作用,那么我需要根据我的需要编写Python脚本..

I am trying to create websphere server instances in my local workstation in RSA programmatically. I believe this can be done using WSAdmin scripts. But i am just giving a try to do this job using one of server APIs or plugins available. It is still a black box since i have no idea that this can be achived or not.

"org.eclipse.wst.server.core" seems to be having set of classes for server operations, but i couldn't find anything to create server instances.

I saw the IServerTypes.class has plenty of server types.

All these made me fall in to the situation that we can create server instances using this plugin.

Can any one of you help me and throw some light on the way that i am proceeding is correct? OR this can be done only by writing WSAdmin scripts and invoking from java?

Thanks.


I have gone through the JMX APIs, looks like they helpful to administer the servers, but not to create server instances... I saw the APIs are for configuring servers which are already created and gather the configuration data to manage them...

But, I am still trying with eclipse server plugin and now able to create servers and profiles seperately using "org.eclipse.wst.server.core" plugin, but i donno how to add those servers into the profiles that i created...

I am also able add/deploy EAR projects to the server i created and publish them... This is how i created the servers.. I have not included the project deployment code in here...

IServerType iServerType = ServerCore.findServerType("com.ibm.ws.ast.st.v7.server.base"); IServerWorkingCopy swc = iServerType.createServer("TestServer", null , monitor); 
swc.setName("TestServer"); 
IServer server = swc.save(true, monitor);

Assume that the profile has already been created... i need to add the profile to this TestServer..

Any help appriciated..

If this way is not working out then i need to go for writing Python scripts for my need..

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

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

发布评论

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

评论(1

情何以堪。 2024-11-22 14:04:39

创建服务器的标准方法是使用 wsadmin。

wsadmin 的东西就是为了这个目的而使用的。

如果您想使用 java,您可以查看 JMX API,因为 wsadmin 在底层使用 JMX API(对于其大部分操作)。话虽如此,我建议您仍然走 wsadmin 路线。

IBM 站点中提供了许多使用 wsadmin 的示例脚本。我在此处粘贴了几个链接供您快速参考:

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_7scrlib.html

http://www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html

HTH

Manglu

The standard way to create servers is using wsadmin.

The wsadmin stuff is meant to be used for this purpose.

If you want to use java you can look at the JMX APIs as wsadmin under the hood uses the JMX APIs (for most of its operations). Having said this i would suggest you still go the wsadmin route.

A number of sample scripts using wsadmin is available in the IBM Site. I am pasting a couple of links here for your quick reference:

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_7scrlib.html

http://www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html

HTH

Manglu

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