[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-java-com
Subject:    Re: Free threaded Java clients
From:       Dave Lennert <davel () WEBRIDGE ! COM>
Date:       1998-11-30 21:17:14
[Download RAW message or body]


We've seen the same thing since day one.  Our observation is that when
Java COM clients CoCreate out-of-proc COM objects (at least ones hosted
by MTS) that Java seems to cause the client proxies to be owned by the
STA thread.

Our workaround is that we insert a simple C++ in-proc COM object that is
an IDispatch-passthrough in front of the the out-of-proc object.
(IDispatch happens to be all we care about.)

- Dave Lennert
  Microsoft Java/COM MVP

 ------------------

Dave Lennert                         503-219-8513
Webridge, Inc.                       503-219-9191 (fax)
225 SW Broadway, Suite 500           davel@webridge.com
Portland, OR   97205                 www.webridge.com


> -----Original Message-----
> From: Jackson Ken [SMTP:JacksonKen@JDCORP.DEERE.COM]
> Sent: Sunday, November 29, 1998 5:16 PM
> To:   Java-COM@DISCUSS.MICROSOFT.COM
> Subject:      Free threaded Java clients
>
> I am attempting to re-write a muti-threaded performance testing client
> in
> Java. The original was in C++. It initialized COM as multi-threaded
> (free)
> with the following call:
>
> hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
>
> When the C++ client is run against a Java server running under MTS,
> multiple
> objects appear "in call" which is the behavior I expected. (The
> particular
> methods being tested take several seconds to run because they are
> accessing
> a legacy database over a network).
>
> However, when called from the Java test client, only 1 object ever
> appears
> in call. I have tried creating the threads with both Thread.start()
> and
> ComLib.ThreadStartMTA() but the behavior is the same.
>
> Questions:
>
> (1) Is is possible to create a true free-threaded client in Java (i.e.
> comparible to COINT_MULTITHREADED)? If so, how?
>
> (2) Is this expected behavior of an MTA client? Why doesn't more than
> one
> thread appear in call?
>
> Thanks in advance,
> Ken Jackson
>
>
> ----------------------------------------------------------------
> Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.  Save time,
> search
> the archives at http://discuss.microsoft.com/archives/index.html

----------------------------------------------------------------
Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic