简体   繁体   中英

Can i create websphere server instance and configure using org.eclipse.wst.server.core plugin?

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..

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM