You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by "Maxim V. Gordienko" <ma...@dgap.mipt.ru> on 2004/08/02 10:07:51 UTC

cactus task and container contextUrl

Hi! 

I'm trying to make cactus task work on app server running on dummy interface 
(app server - JBoss, OS - Linux).
To do this i have to use <generic> container, since <jboss3x> (or any other 
supported container) does not support fine-grained startup configuration.
Ok, jboss, starts on the right interface on the right ports.
Cactus ant task tries to connect server to run tests, but it queries 
"http://localhost:XXX/YYYYY", not custom address which dummy interface uses.
I find no way to configure it (or i've miss it).
in CactusTask.java there is line which sets up contextUrl to 
"http://localhost" + bla bla bla, not any custom address. 

There is a note in the cactus task documentation what task queries localhost 
(only) and container should be configured to accept these requests. 

Are any ways to overcome the situation and force cactus to connect custom 
contextUrl??

RE: cactus task and container contextUrl

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Maxim,

> -----Original Message-----
> From: Maxim V. Gordienko [mailto:maxim@dgap.mipt.ru]
> Sent: lundi 2 août 2004 10:08
> To: cactus-user@jakarta.apache.org
> Subject: cactus task and container contextUrl
> 
> 
> Hi!
> 
> I'm trying to make cactus task work on app server running on dummy
> interface
> (app server - JBoss, OS - Linux).
> To do this i have to use <generic> container, since <jboss3x> (or any
> other
> supported container) does not support fine-grained startup configuration.

What is a "fine-grained startup configuration"?

If it is what I think it is, almost all supported containers support custom
configurations (as specified on
http://jakarta.apache.org/cactus/integration/ant/task_cactus.html). For
jboss3x, that would be the "config" attribute.

Note that Cactus 1.7dev supports more option for jboss3x (see
http://jakarta.apache.org/cactus/changes.html#release_changes).

> Ok, jboss, starts on the right interface on the right ports.
> Cactus ant task tries to connect server to run tests, but it queries
> "http://localhost:XXX/YYYYY", not custom address which dummy interface
> uses.
> I find no way to configure it (or i've miss it).

XXX (which is the port) can be modified using the "port" attribute. YYYY
(which is the servlet context) is the war name usually (or the context
defined in jboss-web.xml).

> in CactusTask.java there is line which sets up contextUrl to
> "http://localhost" + bla bla bla, not any custom address.

Yep, it's:

"http://localhost:" + containers[i].getPort() + "/" 
   + thisDeployable.getTestContext())

> 
> There is a note in the cactus task documentation what task queries
> localhost
> (only) and container should be configured to accept these requests.
> 
> Are any ways to overcome the situation and force cactus to connect custom
> contextUrl??

Nope. I would like to understand what is your use case.

What URL would you like Cactus to use instead?

Thanks
-Vincent