Обсуждение: Concurrent connexions...

Поиск
Список
Период
Сортировка

Concurrent connexions...

От
Дата:
HI !

I made a very simple program that fills-up a table with random data !
Instead of filling up the table at once I though I could better run multiple
instance of it to see how it when ....
I noticed then that the second instance of the App is not running at all !


I basically get the connection manage to create the first statement & then
... nothing
<snip>
    0 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  - Looking
org/postgresql/Driver.class
    15 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  - Class loaded :
org.postgresql.Driver
    15 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  - Getting the
connection
    156 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  - Got the
connection org.postgresql.jdbc2.Connection@5483cd
    156 [Thread-0] INFO org.test.JDBCPostgres.TestJDBCPostgres  - run() is
called
    171 [Thread-0] INFO org.test.JDBCPostgres.TestJDBCPostgres  - Statement
created
</snip>

The two other instance of the program I happened to create are just like
that waiting after the statemetn creation.
Could someone indicate me what is going on ?
What are they waiting for ?

tx,
thomas




--
Thomas SMETS
rue J. Wytsmanstraat 62
1050 Bruxelles
yahoo-id : smetsthomas



Re: Concurrent connexions...

От
"Dave Cramer"
Дата:
Thomas,

It will be very difficult to figure out what your progam is doing with
out the source.

Dave

> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of
> tsmets@brutele.be
> Sent: Tuesday, March 26, 2002 6:30 PM
> To: pgsql jdbc
> Subject: [JDBC] Concurrent connexions...
>
>
>
> HI !
>
> I made a very simple program that fills-up a table with
> random data ! Instead of filling up the table at once I
> though I could better run multiple instance of it to see how
> it when .... I noticed then that the second instance of the
> App is not running at all !
>
>
> I basically get the connection manage to create the first
> statement & then ... nothing <snip>
>     0 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  -
> Looking org/postgresql/Driver.class
>     15 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  -
> Class loaded : org.postgresql.Driver
>     15 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  -
> Getting the connection
>     156 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  -
> Got the connection org.postgresql.jdbc2.Connection@5483cd
>     156 [Thread-0] INFO
> org.test.JDBCPostgres.TestJDBCPostgres  - run() is called
>     171 [Thread-0] INFO
> org.test.JDBCPostgres.TestJDBCPostgres  - Statement created </snip>
>
> The two other instance of the program I happened to create
> are just like that waiting after the statemetn creation.
> Could someone indicate me what is going on ? What are they
> waiting for ?
>
> tx,
> thomas
>
>
>
>
> --
> Thomas SMETS
> rue J. Wytsmanstraat 62
> 1050 Bruxelles
> yahoo-id: smetsthomas
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an
> appropriate subscribe-nomail command to
> majordomo@postgresql.org so that your message can get through
> to the mailing list cleanly
>
>


Re: Concurrent connexions...

От
Дата:
I don't get it ...
I called my program with the following main & now I can have it up & running
on two VM's simultaneously ...

<snip>
  public static void main (String[] args)
    throws SQLException
  {
    BasicConfigurator.resetConfiguration ();
    BasicConfigurator.configure ();

    InsertRandomData[] ird = new InsertRandomData[NBR_THREAD];
    Thread[] t = new Thread[NBR_THREAD];
    int i = 0;
    for (; i<ird.length; i++)
    {
      ird[i] = new InsertRandomData(NBR_OF_RECORDS);
      t[i] = new Thread (ird[i]);
    }

    for (i = 0; i<ird.length; i++)
      t[i].start();
  }
</snip>


--
Thomas SMETS
rue J. Wytsmanstraat 62
1050 Bruxelles
yahoo-id : smetsthomas
----- Original Message -----
From: "Dave Cramer" <Dave@micro-automation.net>
To: <tsmets@brutele.be>; "'pgsql jdbc'" <pgsql-jdbc@postgresql.org>
Sent: 27 March, 2002 12:35 AM
Subject: Re: [JDBC] Concurrent connexions...


> Thomas,
>
> It will be very difficult to figure out what your progam is doing with
> out the source.
>
> Dave
>
> > -----Original Message-----
> > From: pgsql-jdbc-owner@postgresql.org
> > [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of
> > tsmets@brutele.be
> > Sent: Tuesday, March 26, 2002 6:30 PM
> > To: pgsql jdbc
> > Subject: [JDBC] Concurrent connexions...
> >
> >
> >
> > HI !
> >
> > I made a very simple program that fills-up a table with
> > random data ! Instead of filling up the table at once I
> > though I could better run multiple instance of it to see how
> > it when .... I noticed then that the second instance of the
> > App is not running at all !
> >
> >
> > I basically get the connection manage to create the first
> > statement & then ... nothing <snip>
> >     0 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  -
> > Looking org/postgresql/Driver.class
> >     15 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  -
> > Class loaded : org.postgresql.Driver
> >     15 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  -
> > Getting the connection
> >     156 [main] INFO org.test.JDBCPostgres.TestJDBCPostgres  -
> > Got the connection org.postgresql.jdbc2.Connection@5483cd
> >     156 [Thread-0] INFO
> > org.test.JDBCPostgres.TestJDBCPostgres  - run() is called
> >     171 [Thread-0] INFO
> > org.test.JDBCPostgres.TestJDBCPostgres  - Statement created </snip>
> >
> > The two other instance of the program I happened to create
> > are just like that waiting after the statemetn creation.
> > Could someone indicate me what is going on ? What are they
> > waiting for ?
> >
> > tx,
> > thomas
> >
> >
> >
> >
> > --
> > Thomas SMETS
> > rue J. Wytsmanstraat 62
> > 1050 Bruxelles
> > yahoo-id: smetsthomas
> >
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an
> > appropriate subscribe-nomail command to
> > majordomo@postgresql.org so that your message can get through
> > to the mailing list cleanly
> >
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>