Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Adding JBoss runtime configuration from plugin
Adding JBoss runtime configuration from plugin [message #187603] Tue, 06 February 2007 15:44 Go to next message
Mark Berner is currently offline Mark BernerFriend
Messages: 15
Registered: July 2009
Junior Member
How can I can add JBoss runtime configuration from plugin.

Code below creates Runtime configuration, but it does not set add JBoss
root location. As I understand that I should send property
"serverRootDirectory" to configuration bu I didn't way how.

I will very appreciate for any help
Mark


IServerType serverTypeJBoss4 = ServerCore
findServerType("org.eclipse.jst.server.generic.jboss4");
if (serverTypeJBoss4 != null)
{
IRuntimeType runtimeType = serverTypeJBoss4.getRuntimeType();
if (runtimeType != null)
{
IRuntimeWorkingCopy runtimeWorkingCopy = runtimeType.createRuntime(
"jboss.runtime", monitor);

runtimeWorkingCopy.setLocation(newPath(jbossHomeDir.getCanon icalPath()));
runtimeWorkingCopy.save(true, monitor);
}
}
Re: Adding JBoss runtime configuration from plugin [message #187644 is a reply to message #187603] Wed, 07 February 2007 06:04 Go to previous messageGo to next message
Gorkem Ercan is currently offline Gorkem ErcanFriend
Messages: 166
Registered: July 2009
Senior Member
Below is a code snippet from the junit tests for jonas. It show the way
to add attributes to a generic server. Of course jboss has a different
set of properties.

GenericServerRuntime runtimeDelegate =
(GenericServerRuntime)runtimeWorkingCopy.loadAdapter(Generic ServerRuntime.class,new
NullProgressMonitor());

HashMap props = new HashMap();
props.put("mappernames", "");
props.put("classPathVariableName", "JONAS");
props.put("serverAddress", "127.0.0.1");
props.put("jonasBase", "C:\\JOnAS-4.1.4");
props.put("jonasRoot", "C:\\JOnAS-4.1.4");
props.put("classPath", "C:\\JOnAS-4.1.4");
props.put("protocols", "C:\\JOnAS-4.1.4");
props.put("port", "9000");
runtimeDelegate.setServerInstanceProperties(props);

//Save the runtime working copy
runtimeWorkingCopy.save(false,null);

--
Gorkem


Mark Berner wrote:
> How can I can add JBoss runtime configuration from plugin.
>
> Code below creates Runtime configuration, but it does not set add JBoss
> root location. As I understand that I should send property
> "serverRootDirectory" to configuration bu I didn't way how.
>
> I will very appreciate for any help
> Mark
>
>
> IServerType serverTypeJBoss4 = ServerCore
> findServerType("org.eclipse.jst.server.generic.jboss4");
> if (serverTypeJBoss4 != null)
> {
> IRuntimeType runtimeType = serverTypeJBoss4.getRuntimeType();
> if (runtimeType != null)
> {
> IRuntimeWorkingCopy runtimeWorkingCopy = runtimeType.createRuntime(
> "jboss.runtime", monitor);
>
> runtimeWorkingCopy.setLocation(newPath(jbossHomeDir.getCanon icalPath()));
> runtimeWorkingCopy.save(true, monitor);
> }
> }
>
Re: Adding JBoss runtime configuration from plugin [message #187650 is a reply to message #187644] Wed, 07 February 2007 06:26 Go to previous messageGo to next message
Mark Berner is currently offline Mark BernerFriend
Messages: 15
Registered: July 2009
Junior Member
You right, but GenericServerRuntime class is under *.internal package

Mark
Re: Adding JBoss runtime configuration from plugin [message #187843 is a reply to message #187650] Thu, 08 February 2007 21:53 Go to previous messageGo to next message
Gorkem Ercan is currently offline Gorkem ErcanFriend
Messages: 166
Registered: July 2009
Senior Member
You can make an API request through bugzilla for it. If the needs are
general enough I'd be happy to provide that.
--
Gorkem

Mark Berner wrote:
> You right, but GenericServerRuntime class is under *.internal package
>
> Mark
>
Re: Adding JBoss runtime configuration from plugin [message #187879 is a reply to message #187843] Fri, 09 February 2007 19:53 Go to previous message
Mark Berner is currently offline Mark BernerFriend
Messages: 15
Registered: July 2009
Junior Member
Thanks for your answer, I will open request in bugzilla.
Mark
Previous Topic:Generating ant task for warring
Next Topic:Calling export war action in headless mode
Goto Forum:
  


Current Time: Sun Nov 23 10:15:48 GMT 2014

Powered by FUDForum. Page generated in 0.01632 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software