[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-699) Re-use of saved launch configurations is not working.

Rob Stryker (JIRA) jira-events at lists.jboss.org
Wed Sep 19 17:37:11 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBIDE-699?page=comments#action_12377713 ] 
            
Rob Stryker commented on JBIDE-699:
-----------------------------------

There really isn't a way to do this the way you want, Gail.

I'm going to try to be as descriptive as possible, but still, it doesn't look good.   The reasons are as follows:

1) Nothing is stored in the workspace's  Servers project. That project is there for tomcat and other server types. We do not use it at all.

2) The "Configuration path" listed in the server editor (double-click the server) is supposed to point to Servers\someFolder where our server *would* store server-specific items... but we don't. Again, that's a folder we don't use. 

So of course you're wondering, why can't we just store the launch configuration there? The code that associates a server with a launch configuration is not in JBoss Tools or RHDS. but rather inside "Eclipse Webtools Project (WTP)".

Now you're going to say you already asked eclipse about it, and you did, but you asked the part of eclipse concerned with generic uses of launch configurations. Looking at the eclipse bug, they solved the idea of importing launch configurations, in a general sense, and it can now be done. However, the bunch of code that's preventing you from re-using launch configurations in this fashion is in Eclipse Webtools. 

In Eclipse Webtools, each "Server" object is associated *directly* with a launch configuration. The creation of a server *automatically* creates its launch configuration. It's a 1-1 mapping. This isn't our structure that's preventing it, it's Eclipse WTP.

The Common tab of the launch configuration only says where to save it; WTP still prevents the user from using that file for a new server. New servers, again, automatically create their own launch configuration. 

I could, conceivably, try to change this into a feature request to allow you to point to another launch configuration, but there are some more issues. 

Basically, to launch a server, eclipse WTP looks through all the launch configurations it can find until it finds one that matches launch type *and* has a parameter that links it to the current server. An example is:

<stringAttribute key="server-id" value="9_19_07_4_37_PM1"/>

That wierd value is actually the server ID. That value is actually generated by a timestamp of when the server was created. This means that even if you did manage to share, and then add, the shared configuration into the launch manager, you'd need to manually change the server-id attribute of the launch configuration to the one of your newly created server. This is because there's no way to tell the server an ID it should take, and I'm very sure that sharing a "Server" would be *extremely* difficult, what with all the different places server information is stored.  Server objects are serialized in a number of places and sharing that would just be near impossible. 

---

So each server makes its own launch configuration right away. There's no way to tell the server upon creation that it should use some other configuration, so the only option is to create a new server, then *overwrite* the launch configuration hidden deep in the bowels of the debug.launch workspace metadata, but make sure you *don't* overwrite the server-id value so that it links up with your local server and not some other. 

Yes, this seems very restrictive. But this is the structure of eclipse WTP.

The best I can do is turn this into a feature request to allow you to designate another launch configuration as a delegate, but this simply won't be something available any time soon at all.   I'm really sorry, Gail. 




> Re-use of saved launch configurations is not working.
> -----------------------------------------------------
>
>                 Key: JBIDE-699
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-699
>             Project: JBoss Tools
>          Issue Type: Bug
>          Components: JBossAS
>    Affects Versions: 2.0.0.Beta2
>         Environment: Redhat Linux, Eclipse and JBOSS AS package Downloaded as JBossIDE-2.0.0.Beta2-Bundle-linux-gtk.tar
>            Reporter: Gail Nagle
>         Assigned To: Rob Stryker
>         Attachments: JBOSS-AS-Launch-Config-Reuse-Problem-ScreenShots.doc, JBOSS_AS_40.launch
>
>
> There is a fair amount of effort required to create a launch configuration. 
> In particular, a long list of external jars often must be added.
> The clear intention of the JBOSS AS IDE is to be able to save, share and generally re-use these configurations.
> Sharing is further supported by the use of VARIABLE macros in the path of the jars.
> The IDE adds a project to the Eclipse workspace and the launch configuration is also saved to a file
> When attempting to re-use the configuration, the IDE detects the existence of these files since it will not allow the creation of a second configuration with the same name. BUT IT WILL NOT RUN THE EXISTING CONFIGURATION.
> This issue was resolved previously in an earlier version of Eclipse:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=12898
> I recently reported it on http://dev.eclipse.org/newslists/news.eclipse.newcomer/msg17939.html and worked with IBM engineers in Canada to determine that the issue exists in the JBOSS IDE plugin, not in Eclipse itself.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list