|
From: Leif M. <le...@ta...> - 2003-10-31 01:06:41
|
Jim, Philip,
Sorry to hear that you had never gotten that working Jim. As I said
before however,
I have never used the COM interface nor have any plans to in the
foreseeable future.
I would not know where to start trying to fix this with what I have to
go on right now.
If one of you guys could write up a simple simple application which
demonstrates
this problem and explain to me what is going, I might be able to figure
out the problem
and learn a little about COM at the same time :-) I emphasize the word
simple here.
Most likely any conflicts are being caused by the C, or native code,
rather than
anything in Java so if possible it would be best to be able to see
source for both.
Ideally a project zip file where I just have to compile "A", run "B"
and look at "C"
would be great.
I do have a couple questions though. When you say that the
application is failing
in the Wrapper, is that true of running the Wrapper in a console as
well as as a
service?
In either case the Wrapper process is using the CreateProcess API to
create the
JVM as a child process. All of your COM code will then be running
inside of that
child process. There may be some COM setup that needs to be done to
prepare
the child process. Just a guess at this point however.
Cheers,
Leif
Jim, Philip,
Jim Redman wrote:
> Philip,
>
> I hit the same basic problem - and have no solution. In my case, I
> received an iMarshall request, then no other COM requests. Again the
> app works find as a batch file, just not in the wrapper. I have no
> further clues.
>
> Jim
> On 2003.10.30 12:13, Philip Kubat wrote:
>
>> My application is a WMI (Microsoft Wbem) java application. I have
>> used JNI
>> to access WMI via DCOM. The applications works fine if it is run via
>> the
>> command line and java. It does not work within wrapper. I believe
>> the
>> problem is how I am "passing" the pointer to the IWbemServices object.
>> In
>> msdev debug I do not seem to retain a valid object (via pointer) of
>> the
>> object that I need methods of in additional JNI calls. I have two JNI
>> functions. One that creates and connects to WMI via DCOM then stores
>> the
>> pointer into the java environment (in the object that makes the
>> function
>> call to JNI). The second uses methods of that WMI object via the
>> pointer
>> to retrieve system data, this methods is used several time through out
>> the
>> application. Any ideas and thought would be helpful.
>>
>>
>>
>> Does wrapper some who create new threads for these JNI calls? Do I
>> need a
>> better means to pass the pointer? Is there a what to protect the
>> memory of
>> that pointer?
>>
>>
>>
>> Thanks!
>>
>>
>
|