You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dilini Asanga <di...@gmail.com> on 2015/05/09 11:45:14 UTC

Ant does not return after calling org.glassfish.tyrus.client.ClientManager.connectToServer()

Hi,

I have a main class which I want to run using an ant script.
(I have attached the project, which includes this main class:
WebsocketLocalClient; and the ant script I'm referring to)

This main class executes fully, when I'm running it through the command
line.

But when I run it using the ant script, it executes upto,
*System.out.println("Starting Websocket-local publisher");*

but does not execute beyond the line:
*client.connectToServer(new WebsocketLocalEndpoint(), cec, new
URI(socketServerUrl));*

Ant output is given in attachment-1.
It does not execute anything after printing the log '[java] Starting
Websocket-local publisher'

It seems that,
ant does not return after
calling org.glassfish.tyrus.client.ClientManager.connectToServer() method.

Any clues as to why this is happening?

Appreciate any help.
Thanks,
Dilini

Attachment-1:
dilini@dilini-Latitude-E6540:~/github/product-cep/modules/samples/producers/websocket-local-client$
ant
Buildfile:
/home/dilini/github/product-cep/modules/samples/producers/websocket-local-client/build.xml

init:

compile:
    [javac]
/home/dilini/github/product-cep/modules/samples/producers/websocket-local-client/build.xml:58:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
     [copy] Copying 1 file to
/home/dilini/github/product-cep/modules/samples/producers/websocket-local-client/temp/classes

run:
     [echo]  Configure -Durl=xxxx -Dtopic=xxxx and (-DfilePath=xxxx and/or
-Dsn='sample number')
     [java] Starting Websocket-local publisher

Re: Ant does not return after calling org.glassfish.tyrus.client.ClientManager.connectToServer()

Posted by Antoine Levy Lambert <an...@gmx.de>.
Hi,

I did not take a look at the attached zip file.

How does ant call WebsocketLocalClient ? I would assume using the java task.

The java task has fork and spawn attributes. I think that if WebsocketLocalClient is a long running process you should start it with fork=“true” and spawn=“true”. This starts another java process and ant’s execution thread goes further immediately after spawning thisi process.

Regards,

Antoine

On May 9, 2015, at 5:45 AM, Dilini Asanga <di...@gmail.com> wrote:

> <websocket-local-client.zip>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org