Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

multi-threads with Jconnect

4 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-07-30 19:05:27.0Z
Khiem Ho Posted on 1997-07-12 05:40:26.0Z
Message-ID: <33C718CA.4408@ix.netcom.com>
Date: Fri, 11 Jul 1997 22:40:26 -0700
From: Khiem Ho <tuyen.ho@ix.netcom.com>
X-Mailer: Mozilla 3.01Gold (Win95; I)
MIME-Version: 1.0
Subject: multi-threads with Jconnect
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 6
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:554
Article PK: 252304

Can we do multi-threads with jconnect, each thread having
its own connection? Is there any example?

Has anyone tried it? If yes, any issues that we should be aware
of?

Thanks
khiem@ptp.hp.com


Lance Andersen Posted on 1997-07-22 19:58:22.0Z
Message-ID: <33D510DE.7AAF@sybase.com>
Date: Tue, 22 Jul 1997 15:58:22 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
Subject: Re: multi-threads with Jconnect
References: <33C718CA.4408@ix.netcom.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 22
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:483
Article PK: 252233


Khiem Ho wrote:
>
> Can we do multi-threads with jconnect, each thread having
> its own connection? Is there any example?
>
> Has anyone tried it? If yes, any issues that we should be aware
> of?
>
> Thanks
> khiem@ptp.hp.com

Yes you can do multi-threading. Yes each thread can have
its own connection.

We have not shipped any multi-threaded examples with the product
yet but hope to do so in a future release.
--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Technical Support Phone:(617) 564-6336
77 South Bedford Street Fax: (617) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================


Michel van der List Posted on 1997-07-25 17:31:22.0Z
Message-ID: <33D8E2EA.167E@sbphrd.com>
Date: Fri, 25 Jul 1997 13:31:22 -0400
From: Michel van der List <vanderlistmj@sbphrd.com>
Organization: SmithKline Beecham Pharmaceuticals R & D, Bioinformatics
X-Mailer: Mozilla 3.0Gold (X11; I; OSF1 V4.0 alpha)
MIME-Version: 1.0
To: Lance Andersen <lancea@sybase.com>
Subject: Re: multi-threads with Jconnect
References: <33C718CA.4408@ix.netcom.com> <33D510DE.7AAF@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 27
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:464
Article PK: 252216


Lance Andersen wrote:
>
> Khiem Ho wrote:
> >
> > Can we do multi-threads with jconnect, each thread having
> > its own connection? Is there any example?
> >
> > Has anyone tried it? If yes, any issues that we should be aware
> > of?
> >
> > Thanks
> > khiem@ptp.hp.com
>
> Yes you can do multi-threading. Yes each thread can have
> its own connection.
>
> We have not shipped any multi-threaded examples with the product
> yet but hope to do so in a future release.

I have been unable to find whether it is possible to multi-thread
connections and statements. Ie. can I use the same connection in
multiple threads and can I use the same statement in multiple
threads? Or do I need to instantiate separate connections for
each thread?

Michel.

--
-------------------------------------------------------------------
Michel van der List SmithKline Beecham Pharmaceuticals R & D
vanderlistmj@sbphrd.com UW2230, 709 Swedeland Road, P.O. Box 1539
(610) 270-4525 King of Prussia, PA 19406-0939


David Clegg Posted on 1997-07-30 19:05:27.0Z
Message-ID: <33DF9077.2CA5C5FA@sybase.com>
Date: Wed, 30 Jul 1997 12:05:27 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 3.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: Michel van der List <vanderlistmj@sbphrd.com>
Subject: Re: multi-threads with Jconnect
References: <33C718CA.4408@ix.netcom.com> <33D510DE.7AAF@sybase.com> <33D8E2EA.167E@sbphrd.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 24
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:444
Article PK: 252195

Connections are thread-safe, Statements are not. You can have
multiple threads working on different Statements on the same
connection at the same time, but if you try to have multiple
threads working on the same Statement (or ResultSet from a
statement), then they will interfere with each other and results
will be unpredictable.

dave

> I have been unable to find whether it is possible to multi-thread
> connections and statements. Ie. can I use the same connection in
> multiple threads and can I use the same statement in multiple
> threads? Or do I need to instantiate separate connections for
> each thread?
>
> Michel.
>
> --
> -------------------------------------------------------------------
> Michel van der List SmithKline Beecham Pharmaceuticals R & D
> vanderlistmj@sbphrd.com UW2230, 709 Swedeland Road, P.O. Box 1539
> (610) 270-4525 King of Prussia, PA 19406-0939