Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Default VM settings in the .launch file for Tomcat server.
Default VM settings in the .launch file for Tomcat server. [message #233789] Fri, 17 July 2009 07:31 Go to next message
Eclipse User
Originally posted by: somebody.nowhere.com

Hi,

In Eclipse, Server view, I created a new Server and following the prompts
created a new Tomcat 5.5 server.

I would like to know how is the related .LAUNCH file created in
<workspace-folder>\.metadata\.plugins\org.eclipse.debug.core\.launches

By creation, I mean it has some deafult VM settings;
where do they come from?
can I edit or set any preferance whereby the default VM settings; are
appended with a few of my own (sparing me the effort of editing the launch
configuration, every time I creat a server instance)

~g1
PS: For some reason; I need to 're-cycle' (delete & create-new) the server
instance a lot of times.
Re: Default VM settings in the .launch file for Tomcat server. [message #233797 is a reply to message #233789] Fri, 17 July 2009 09:20 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1293
Registered: July 2009
Senior Member
Jeevan Sunkersett wrote:
> Hi,
>
> In Eclipse, Server view, I created a new Server and following the
> prompts created a new Tomcat 5.5 server.
>
> I would like to know how is the related .LAUNCH file created in
> <workspace-folder>\.metadata\.plugins\org.eclipse.debug.core\.launches

It's created programmatically by the WTP server support. I can point
you to source code if you want to dig deeper.

>
> By creation, I mean it has some deafult VM settings;
> where do they come from?
> can I edit or set any preferance whereby the default VM settings; are
> appended with a few of my own (sparing me the effort of editing the
> launch configuration, every time I creat a server instance)

The only preference that I can think of that would affect the server
launching like this for Tomcat servers is the Default VM Arguments
available in the Installed JRE. These arguments would not appear in the
launch configuration, but would be included when Tomcat is started with
a Tomcat runtime that used that JRE.

>
> ~g1
> PS: For some reason; I need to 're-cycle' (delete & create-new) the
> server instance a lot of times.

What goes wrong that you need to re-cycle the server?

>
Re: Default VM settings in the .launch file for Tomcat server. [message #233813 is a reply to message #233797] Fri, 17 July 2009 14:41 Go to previous messageGo to next message
Jeevan Sunkersett is currently offline Jeevan Sunkersett
Messages: 7
Registered: July 2009
Junior Member
Thx Larry ,

To be explicit, I want the VM arguments in the Launch file to include....

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=104 4

(for remote debuging)

I can easily do that by editing the launch configuration via the wizard
provided; but I was looking for a way, whereby those -X vm paramaters are
applied to the server launch configuration everytime it is created by
default.

But I find myself, recycling the server instance very often and its a pain
to edit the configuration to add the custom -X vm parameters every time;
and so want it added by default.

As it is done programatically by the WTP plugin, please can you point me
to the exact plugin/ source; (I am assuming the parameters are picked from
a resources bundle and not hard coded....that way maybe I can edit the
resources bundle and rebuild the plugin and use).

~g1
Re: Default VM settings in the .launch file for Tomcat server. [message #233821 is a reply to message #233813] Fri, 17 July 2009 14:44 Go to previous messageGo to next message
Jeevan Sunkersett is currently offline Jeevan Sunkersett
Messages: 7
Registered: July 2009
Junior Member
on second thoughts,

if what you say, works ....

> The only preference that I can think of that would affect the server
> launching like this for Tomcat servers is the Default VM Arguments
> available in the Installed JRE. These arguments would not appear in the
> launch configuration, but would be included when Tomcat is started with
> a Tomcat runtime that used that JRE.

that too can suffice for now; let me test it.

~g1

PS: BTW, I only took Tomcat as an example.
I guess this will apply to any server supported in WTP
(I am primarily using Gerinomo)
Re: Default VM settings in the .launch file for Tomcat server. [message #233828 is a reply to message #233813] Fri, 17 July 2009 15:56 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1293
Registered: July 2009
Senior Member
Jeevan Sunkersett wrote:
> Thx Larry ,
>
> To be explicit, I want the VM arguments in the Launch file to include....
>
> -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=104 4
>
> (for remote debuging)
>
> I can easily do that by editing the launch configuration via the wizard
> provided; but I was looking for a way, whereby those -X vm paramaters
> are applied to the server launch configuration everytime it is created
> by default.
>
> But I find myself, recycling the server instance very often and its a
> pain to edit the configuration to add the custom -X vm parameters every
> time; and so want it added by default.
>
> As it is done programatically by the WTP plugin, please can you point me
> to the exact plugin/ source; (I am assuming the parameters are picked
> from a resources bundle and not hard coded....that way maybe I can edit
> the resources bundle and rebuild the plugin and use).

What needs to be done to "fix up" a default launch configuration is
either dynamic or fixed, so there isn't much to gained by a resource
bundle lookup. You can start with the
org.eclipse.jst.server.tomcat.core.TomcatServerBehaviour.set upLaunchConfiguration()
class found in the tomcat.core plug-in. That is where the Tomcat
plug-in applies it's required changes to the launch configuration.

You can also look at
org.eclipse.wst.server.core.Server.getLaunchConfiguration() to see where
the launch configuration "originates". A quick look didn't seem to show
much initialization prior to being handed to the
setupLaunchConfiguration() method.

Cheers,
Larry

>
> ~g1
>
Previous Topic:How To Make A Customized Project Wizard By Extending ModifyFacetedProjectWizard
Next Topic:e.p. "org.eclipse.wst.validation.referencialFileValidator"
Goto Forum:
  


Current Time: Tue Jul 22 07:28:05 EDT 2014

Powered by FUDForum. Page generated in 0.07180 seconds