Bug 267799 - Why exclude servers with no runtimes?
Summary: Why exclude servers with no runtimes?
Status: NEW
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P4 minor (vote)
Target Milestone: Future   Edit
Assignee: Angel Vera CLA
QA Contact: Tim deBoer CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2009-03-10 05:40 EDT by Rob Stryker CLA
Modified: 2009-12-17 15:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Stryker CLA 2009-03-10 05:40:08 EDT
I realize this is not exactly a "new" bug, but, I'm curious why the new server wizard would explicitly ignore servers that don't provide a runtime.

The servertype xml explicitly asks if your server requires or provides a runtime, the answer to which can be "true" or "false". 

What if a user wants to create a server that provides no runtime but can still be started, stopped, etc, and would like to make use of the new servers wizard to do so? 

What is the suggested method of creating a server that provides no runtime aside from using API? Thanks ;) 

See ServerTypeTreeContentProvider.include(IServerType)

	protected boolean include(IServerType serverType) {
		if (serverTypeId != null && !serverType.getId().startsWith(serverTypeId))
			return false;
		
		IRuntimeType runtimeType = serverType.getRuntimeType();
		if (runtimeType == null)
			return false;

// etc
Comment 1 Tim deBoer CLA 2009-03-10 17:31:36 EDT
Don't remember if this was intentional or not, may have just been an oversight and lack of testcases. I assume you have a server like this and the bug isn't just theoretical?
Comment 2 Rob Stryker CLA 2009-03-10 22:42:41 EDT
Eh... I was making a quick EC plugin and didn't want any runtime or wizards and noticed it wasn't possible.  As of now it's theoretical but who knows what server types I could create in the future.

I say leave this opened, mark for later, and if this ever becomes a real issue (ie one i need fixed for future dev) I'll provide a patch. Until then it'll be a good place for others experiencing the same problem to post, vote, and possibly contribute. 
Comment 3 Angel Vera CLA 2009-03-11 07:56:14 EDT
I agree with Rob's comment #2. Marking for Future and helpwanted
Comment 4 Rob Stryker CLA 2009-10-13 17:33:51 EDT
I've done some more testing. What's really weird is that if the "runtime" attribute of the server type is "false", but the "runtimeTypeId" attribute has a legitimate value, it will show this server type but then NOT create the runtime.

So basically you need to just have a dummy stub runtime, set your "runtimeTypeId" to that value, and set "runtime" to false, and it will create a server with no runtime which can still support deploying things. (aka my goal)

I'd suggest (but test cases would need to be run) that there would be no ill effects of simply returning true here in the event of no runtime. 

I would also suggest that you make the runtimeTypeId attribute no longer "required" but rather "optional"
Comment 5 Angel Vera CLA 2009-12-17 15:55:48 EST
Not sure why this bug was targeted to M4, since this is not a burning issue. To accommodate the last comment, we would have to a search on the code to see what the impact is, but we are willing to commit the time right now as this is not a burning issue.

Moving out to future.