Grails

Tomcat server blocks when running a war (prevents functional testing against WAR)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.3.4
  • Fix Version/s: 1.3.5
  • Component/s: None
  • Labels:
    None

Description

The change introduced in http://github.com/grails-plugins/grails-tomcat-plugin/commit/3f26f4d6305353588244ee502acbe08109024f5b has caused this.

Tomcat is now launched in forked JVM, and ant sits and waits for that process to finish before returning control which doesn't happen.

One solution would be to spawn the new proces, allowing control to return immediately, but this has issues in that ant then gives us no control over the spawned process so we will have no way of knowing it's status unless we roll our own IPC.

I am going to solve this by running the ant.java task in a separate thread and monitor it's output via ant's ability to redirect the launched process's IO to files.

Activity

Hide
Luke Daley added a comment -

Resolved by: http://github.com/alkemist/grails-tomcat-plugin/commit/c0c8197a4aa0e5b0ae4c5652ee1a13f50a733a19

Can someone please pull this into the plugin as I don't have commit rights.

Show
Luke Daley added a comment - Resolved by: http://github.com/alkemist/grails-tomcat-plugin/commit/c0c8197a4aa0e5b0ae4c5652ee1a13f50a733a19 Can someone please pull this into the plugin as I don't have commit rights.
Hide
Jeff Brown added a comment -

The change has been pulled. I am leaving the issue open, pending testing.

Show
Jeff Brown added a comment - The change has been pulled. I am leaving the issue open, pending testing.
Hide
Lari Hotari added a comment -

(This problem isn't directly related to this issue, but probably broke by the same change originally.)

System properties specified at the command line should be passed to run-war (tomcat instance) too.
For example we are using something like this to run grails: "grails -Ddevdb.host=dbhost run-war" . This no longer works in Grails 1.3.x . Also noticed that "grails prod run-war" seems to start some other environment?
Is there a issue for these problems already?

Show
Lari Hotari added a comment - (This problem isn't directly related to this issue, but probably broke by the same change originally.) System properties specified at the command line should be passed to run-war (tomcat instance) too. For example we are using something like this to run grails: "grails -Ddevdb.host=dbhost run-war" . This no longer works in Grails 1.3.x . Also noticed that "grails prod run-war" seems to start some other environment? Is there a issue for these problems already?
Hide
Luke Daley added a comment -

It's unlikely there is an issue for that as this change was only introduced in the .4 versions.

Show
Luke Daley added a comment - It's unlikely there is an issue for that as this change was only introduced in the .4 versions.
Hide
Luke Daley added a comment -

Jeff, have you deployed a new version of the tomcat plugin with this change? I have some work on grails-core that I want to commit that relies on these changes to grails-tomcat.

Show
Luke Daley added a comment - Jeff, have you deployed a new version of the tomcat plugin with this change? I have some work on grails-core that I want to commit that relies on these changes to grails-tomcat.
Hide
Jeff Brown added a comment -

Luke,

I think r9695 in the core svn plugin repo includes http://github.com/grails-plugins/grails-tomcat-plugin/commit/9baa4eed60cb9ffdadcaadf833e19f9d78971244. Is that what you need?

Show
Jeff Brown added a comment - Luke, I think r9695 in the core svn plugin repo includes http://github.com/grails-plugins/grails-tomcat-plugin/commit/9baa4eed60cb9ffdadcaadf833e19f9d78971244. Is that what you need?
Hide
Luke Daley added a comment -

That's the one, thanks.

This can be closed as far as I am concerned.

Show
Luke Daley added a comment - That's the one, thanks. This can be closed as far as I am concerned.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: