Yeah you are stopping the server on the main thread before the other
threads have a chance to execute
On Mon, 15 Jun 2015 at 17:57, Jason <[email protected]> wrote:
>
> Ok, I'm stumped... not sure why I'm getting a connection refused. I'm
>>> running
>>>
>>
> public static void main(String args[]) throws Exception {
> args = new String[]{ "-tcpPort", "15351" };
>
> //configure log4j
> PropertyConfigurator.configure("./deliverables/log4j.properties");
>
> //start the server
> Server server = Server.createTcpServer(args);
> server.start();
>
> logger.debug(server.getStatus());
>
> //create and start thread 1
> new Thread(
> new MindlessQuery(new
> PfpInteractionDao(Integer.parseInt(args[1]))),
> "Query-thread-1").start();
> // create and start thread 2
> // new Thread(
> // new MindlessQuery(new
> PfpInteractionDao(Integer.parseInt(args[1]))),
> // "Query-thread-2").start();
>
> server.stop();
> }
>
> This time I get a multitude of *Connection Refused* which I'm sure would
> equal the total of iterations in *MindlessQuery*.
>
> Thoughts?
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.