Local port

Why is the local port in a run configuration? Picture this scenario, which is impossible with port being per run config.

- App server can bind to multiple ports and hosts
- User selects what port a particular webapp is to run on.

This used to be possible by having a custom deployment panel for the web module, to allow the user to select the appropriate port/website to 'mount' the webapp on. Of course, this is still possible. However, the introduction of a global local port concept (1 per run instance) makes it impossible to have a sane UI to support the above scenario.

So I suggest that this method be removed (getLocalPort), and instead let the plugin itself display the appropriate textfield or whatever it wants for local port, so it has the choice of putting it in the web deployment panel or in the main config panel.

34 comments
Comment actions Permalink

This value is used only for opening browser for local configuration. Can you
suggest some better name?

--
Olesya Smirnova
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Hani Suleiman" <hani@formicary.net> wrote in message
news:3228724.1086371692174.JavaMail.itn@is.intellij.net...

Why is the local port in a run configuration? Picture this scenario, which

is impossible with port being per run config.
>

- App server can bind to multiple ports and hosts
- User selects what port a particular webapp is to run on.

>

This used to be possible by having a custom deployment panel for the web

module, to allow the user to select the appropriate port/website to 'mount'
the webapp on. Of course, this is still possible. However, the introduction
of a global local port concept (1 per run instance) makes it impossible to
have a sane UI to support the above scenario.
>

So I suggest that this method be removed (getLocalPort), and instead let

the plugin itself display the appropriate textfield or whatever it wants for
local port, so it has the choice of putting it in the web deployment panel
or in the main config panel.


0
Comment actions Permalink

Where do you see this setting? This is exactly what I need. All of our
applications have their own port. In order for IntelliJ to open the
browser to my webapp, it needs to know the port number. I can't find it.

Norris Shelton
Sun Certified Java Programmer




Olesya Smirnova (JetBrains) wrote:

>This value is used only for opening browser for local configuration. Can you
>suggest some better name?
>

>

0
Comment actions Permalink

Well this seems a weird half-way solution. I think the api should do one of two things:

1) Allow the user to specify the url to launch, completely (ie, with host and port)

2) Allow the api to return the URL to launch, completely.

Also, do people really really need the option to launch a browser when running a webapp? Given that in most cases, you'll end up with a new window, probably new session etc. I personally am most likely going to stick to run -> switch to browser -> refresh. What do others think?

0
Comment actions Permalink

I thought this was a waste of time also. I tried it for Maxim. It
actually is useful. Especially if you are trying to test a specific
part of the functionality.

I have a webapp that uses some really weird stuff to login. I am just
working on the authentication piece. So, I have it opening to my login
page. This makes it nice. I can configure multiple of these for the
module so that I have get directly to the place I need.

Can you tell me where the option is? I do not see it.

Norris Shelton
Sun Certified Java Programmer




Hani Suleiman wrote:

>Well this seems a weird half-way solution. I think the api should do one of two things:
>
>1) Allow the user to specify the url to launch, completely (ie, with host and port)
>
>2) Allow the api to return the URL to launch, completely.
>
>Also, do people really really need the option to launch a browser when running a webapp? Given that in most cases, you'll end up with a new window, probably new session etc. I personally am most likely going to stick to run -> switch to browser -> refresh. What do others think?

>

0
Comment actions Permalink

On Wed, 09 Jun 2004 18:23:53 +0400, Hani Suleiman wrote:

Also, do people really really need the option to launch a browser when
running a webapp? Given that in most cases, you'll end up with a new
window, probably new session etc. I personally am most likely going to
stick to run -> switch to browser -> refresh. What do others think?


I think it's useless because you can't say how you want the browser to be
launched. Personally, I'd only use it if I could tell my browser to open
a new tab. IIRC there are/were tracker requests to allow this but they
were either low priority or marked "Do Not Fix". I'd actually like this
more for viewing external JavaDoc - I doubt very much I'd use it for
webapps.

--
Mark Scott

0
Comment actions Permalink

It's openapi method but if you're using jsr45 integration this option is on
the first page. What integration are you using? Weblogic and tomcat should
provide correct value based on config xml (for local configuration)

--
Olesya Smirnova
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Norris Shelton" <i.hate.spam@yahoo.com> wrote in message
news:40C71EBD.905@yahoo.com...

I thought this was a waste of time also. I tried it for Maxim. It
actually is useful. Especially if you are trying to test a specific
part of the functionality.

>

I have a webapp that uses some really weird stuff to login. I am just
working on the authentication piece. So, I have it opening to my login
page. This makes it nice. I can configure multiple of these for the
module so that I have get directly to the place I need.

>

Can you tell me where the option is? I do not see it.

>

Norris Shelton
Sun Certified Java Programmer

>
>
>
>

Hani Suleiman wrote:

>

>Well this seems a weird half-way solution. I think the api should do one

of two things:

>
>1) Allow the user to specify the url to launch, completely (ie, with host

and port)

>
>2) Allow the api to return the URL to launch, completely.
>
>Also, do people really really need the option to launch a browser when

running a webapp? Given that in most cases, you'll end up with a new window,
probably new session etc. I personally am most likely going to stick to
run -> switch to browser -> refresh. What do others think?

>
>



0
Comment actions Permalink

Hi,

I will apreciate the information on how many times you press Run (Debug)
/ Deploy / Compile during the working day?


Hani Suleiman wrote:

Also, do people really really need the option to launch a browser when running a webapp? Given that in most cases, you'll end up with a new window,


probably new session etc. I personally am most likely going to stick to
run -> switch to browser -> refresh. What do others think?

--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Em Wed, 09 Jun 2004 18:52:14 +0400, Maxim Mossienko escreveu:

I will apreciate the information on how many times you press Run (Debug) /
Deploy / Compile during the working day?


Hmm... maybe hundreds of times? Basically, everytime I change classes or
configuration files I need to redeploy the application. When I am in
heavy development (as opposed to maintenance) this is potentially once
every 10 minutes or so.

probably new session etc. I personally am most likely going to stick to
run -> switch to browser -> refresh. What do others think?


Agreed. I keep one browser window open all the time, refreshing it when
necessary. I don't need IDEA to launch the browser for me.

--
Marcus Brito <pazu@animegaiden.com.br>


0
Comment actions Permalink

Precisely. You have no control over the launched browser. So, this is fine if every session is independent and you're viewing a static page. However, given a session, or a page flow sensitive process, it really won't work.

0
Comment actions Permalink

Hi,

Hani Suleiman wrote:

Precisely. You have no control over the launched browser. So, this is fine if every session is independent and you're viewing a static page. However, given a session, or a page flow sensitive process, it really won't work.


Surely, in this case one will not need the browser.
Btw, in future we will get the control on the embedded browser.

--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Hmmm. I use tomcat. It should parse it, but I bet it is difficult.
Each context is within it's own port. This allows each context to have
/ as a root.

Norris Shelton
Sun Certified Java Programmer




Olesya Smirnova (JetBrains) wrote:

>It's openapi method but if you're using jsr45 integration this option is on
>the first page. What integration are you using? Weblogic and tomcat should
>provide correct value based on config xml (for local configuration)
>

>

0
Comment actions Permalink

Many, many, many times ;)

deploy probably not as often as the other two though. Generally I make smal incremental changes, run and test, make more changes, etc (rather than coding huge chunks in one go).

0
Comment actions Permalink

This is all we do all day :)

we do it alot, especially if you're working with JSP scriptlets or something, sometimes the error is not evident until you run it, and then you go back change deploy.

Sometimes you stop the process all together if you're writing code and you don't want the overhead of the app server running.

R

0
Comment actions Permalink

Hi,


All times Run \ Compile with web modules ?
Does it mean that Hot Swap is of no practical use for you?

Hani Suleiman wrote:

Many, many, many times ;)

deploy probably not as often as the other two though. Generally I make smal incremental changes, run and test, make more changes, etc (rather than coding huge chunks in one go).



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

hotswap only works if you're debugging, not running. I've also found debug to be slower than run, in general. Orion also has a very fast startup time so it's really no wait at all to keep restarting it.

0
Comment actions Permalink

Em Wed, 09 Jun 2004 19:55:16 +0400, Hani Suleiman escreveu:

hotswap only works if you're debugging, not running. I've also found debug
to be slower than run, in general. Orion also has a very fast startup time
so it's really no wait at all to keep restarting it.


Moreover, hotswap only works if you're changing the body of existing
methods. If you add or remove a method or a class, or simply change an
existing signature, or even just reference an outer field from an inner
class, hotswap won't work.

In other words, hotswap is useful only for very small changes. For
anything else I need to stop/run again.

--
Marcus Brito <pazu@animegaiden.com.br>


0
Comment actions Permalink

Exactly. Orion has a similar issue where you can select the 'site' you map a webapp to. So you can have one SSL site, a couple of http ones with different ports, all running the same webapp. It's not a 1-1 relationship.

0
Comment actions Permalink

Context is specified in a configuration so it can evaluate port value, and
this is more convinient for user (I think) then manual settings ...

--
Olesya Smirnova
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Hani Suleiman" <hani@formicary.net> wrote in message
news:18981691.1086796664556.JavaMail.itn@is.intellij.net...

Exactly. Orion has a similar issue where you can select the 'site' you map

a webapp to. So you can have one SSL site, a couple of http ones with
different ports, all running the same webapp. It's not a 1-1 relationship.


0
Comment actions Permalink

Yeah it is. However, the UI allows you to start an appserver with multiple webapps deployed, how do you pick which port to launch the browser with in that case?

0
Comment actions Permalink

Yes, but (for weblogic and tomcat at least) you have to specify domain (for
wl) or app context (for tomcat) so port can be evaluated. You can request
this value from the config panel for example.

--
Olesya Smirnova
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Hani Suleiman" <hani@formicary.net> wrote in message
news:27681740.1086798274792.JavaMail.itn@is.intellij.net...

Yeah it is. However, the UI allows you to start an appserver with multiple

webapps deployed, how do you pick which port to launch the browser with in
that case?


0
Comment actions Permalink

I know, the point I'm making is that the current UI restricts you to one context per run, instead of allowing a context per web-app (admittedly, a fairly rare need).

0
Comment actions Permalink

Or hotswapping in the case reloads the whole Tomcat context, if you're using Tomcat.

Further hotswapping always opens up a tab, does the hotswap and then never goes away unless you click on it, so if you're working on watching your changes, it's a real pain in the ass especially if you're making lots of changes quickly. Telling IDEA to just hotswap should have a feature which will let you hotswap quietly without popup windows or tabs opening or anything.

Hotwap also seems to always keep trying to hotwap a class over and over again even though it's already been loaded. This usually happens if you add a new method, and even though Tomcat reloaded the app, IDEA seems to be oblivious to that, and keeps popping up a window constantly. So if I'm going to get all this stuff happening, I'd rather turn off hotwapping and just reload myself and not get annoyed down the line.

Again a usability issue that's been around forever. (I even have an SRC for it somewhere)

Thanks
R

0
Comment actions Permalink

Em Wed, 09 Jun 2004 21:41:13 +0400, Robert S. Sfeir escreveu:

Further hotswapping always opens up a tab, does the hotswap and then never
goes away unless you click on it, so if you're working on watching your
changes, it's a real pain in the ass especially if you're making lots of
changes quickly. Telling IDEA to just hotswap should have a feature which
will let you hotswap quietly without popup windows or tabs opening or
anything.


You can get rid of the popup window -- just select to always hot swap in
the debugger configuration. The message pane, however, really annoys me.

--
Marcus Brito <pazu@animegaiden.com.br>


0
Comment actions Permalink

Once if I can help it. I keep the app server running and just redeploy
all the time.

Of course, I'm running on a dual amd 2400 with a gig of dram.

Norris Shelton
Sun Certified Java Programmer




Maxim Mossienko wrote:

Hi,

>

I will apreciate the information on how many times you press Run
(Debug) / Deploy / Compile during the working day?

>
>

Hani Suleiman wrote:

>
>> Also, do people really really need the option to launch a browser
>> when running a webapp? Given that in most cases, you'll end up with a
>> new window,
>
>

probably new session etc. I personally am most likely going to stick
to run -> switch to browser -> refresh. What do others think?

>

0
Comment actions Permalink

Hi,

So would it be more usable to do just redeployment of the changed modules?

Robert S. Sfeir wrote:

Or hotswapping in the case reloads the whole Tomcat context, if you're using Tomcat.

Further hotswapping always opens up a tab, does the hotswap and then never goes away unless you click on it, so if you're working on watching your changes, it's a real pain in the ass especially if you're making lots of changes quickly. Telling IDEA to just hotswap should have a feature which will let you hotswap quietly without popup windows or tabs opening or anything.

Hotwap also seems to always keep trying to hotwap a class over and over again even though it's already been loaded. This usually happens if you add a new method, and even though Tomcat reloaded the app, IDEA seems to be oblivious to that, and keeps popping up a window constantly. So if I'm going to get all this stuff happening, I'd rather turn off hotwapping and just reload myself and not get annoyed down the line.

Again a usability issue that's been around forever. (I even have an SRC for it somewhere)

Thanks
R



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Not sure what you mean. I still don't think you should yank Hotswap, it has its use, I think that Hotswap should be more transparent.

the problem is that if you have a class and add a method. Normally hotswap can't swap that. Fine. At that point Tomcat auto redeploys the app. I'm not sure this happens in other app servers. if not then yes it needs to auto redeploy it.

The second problem is that even after the container redeploys the app, say you make a modification to the same class again, well idea brings up the stupid hotswap message window telling me it can't hotswap it. Guess what... it's already done it, so it SHOULD be able to hotswap it, so IDEA in this case didn't know that the container redeployed the file automatically.

So I say autoredeploy the module if you get a hotswap error. However if the container is auto redeploying, then you're going to have instances where you're double redeploying... which will make it worse.

The problem is that so far I haven't been able to tell Tomcat NOT to auto redeploy an app on class change, and that's one of the problems. Other app servers will behave differently, but since Tomcat is the default flavor, users will have this problem.

I hope this makes sense.

R

0
Comment actions Permalink

BTW Marcus, I already did that to allow it to auto hotswap, I was referring to the ever annoying uninformative messag window which imposes itself on us for no reason what so ever. That makes it pretty close to unusable for me, but I have to use it because Hotswap is in fact useful.

R

0
Comment actions Permalink

Em Wed, 09 Jun 2004 23:34:05 +0400, Robert S. Sfeir escreveu:

BTW Marcus, I already did that to allow it to auto hotswap, I was
referring to the ever annoying uninformative messag window which imposes
itself on us for no reason what so ever. That makes it pretty close to
unusable for me, but I have to use it because Hotswap is in fact useful.


Agree, agree and agree. Here we go:

http://www.intellij.net/tracker/idea/viewSCR?publicId=34284

--
Marcus Brito <pazu@animegaiden.com.br>


0
Comment actions Permalink

To stop automatic deployment on Tomcat, set the following:
You will then have to use the tomcat Manager webapp to deploy or bounce the server. Norris Shelton Sun Certified Java Programmer Robert S. Sfeir wrote: >Not sure what you mean. I still don't think you should yank Hotswap, it has its use, I think that Hotswap should be more transparent. > >the problem is that if you have a class and add a method. Normally hotswap can't swap that. Fine. At that point Tomcat auto redeploys the app. I'm not sure this happens in other app servers. if not then yes it needs to auto redeploy it. > >The second problem is that even after the container redeploys the app, say you make a modification to the same class again, well idea brings up the stupid hotswap message window telling me it can't hotswap it. Guess what... it's already done it, so it SHOULD be able to hotswap it, so IDEA in this case didn't know that the container redeployed the file automatically. > >So I say autoredeploy the module if you get a hotswap error. However if the container is auto redeploying, then you're going to have instances where you're double redeploying... which will make it worse. > >The problem is that so far I haven't been able to tell Tomcat NOT to auto redeploy an app on class change, and that's one of the problems. Other app servers will behave differently, but since Tomcat is the default flavor, users will have this problem. > >I hope this makes sense. > >]]>R

>

0
Comment actions Permalink

Thanks Norris,

For the longest time this did not use to work. I'll give it a try. See with this setting on, I can push the redeploy from inside idea by undeploying and redeploying the app. This makes more sense.

Now we need to solve the lame message window.

R

0

Please sign in to leave a comment.