?
Solved

DCOM - Creating a single server instance

Posted on 2003-03-14
9
Medium Priority
?
507 Views
Last Modified: 2010-04-16
I am facing a peculiar problem when I am using the remote data module.( File -> New -> Multi tier -> remote Data module)

I made a simple application server using remote data module object (myserver).Saved it on a machine 1 as 'server.dpr'. Ran it once.( so it gets registered).

I made a simple client with a dcom connection object and set its properties
computer name = 'machine1'
server name = 'server.myserver'

 Placed the client on machine 2 and machine 3

a) Ran a client on machine 2 and machine 3
But i see that it creates an instance on machine 1 for each client.

b) I ran 2 client  instance from machine 2 and surprisingly it doesnt open a new instance

c) I went and changed the (dcomcnfg.exe) identity tab to 'interactive user'
When i do so clients from machine 2 and 3 ,are not able to access the server at all.

The code where i am focussing is

 1)
 TComponentFactory.Create(ComServer, TMyApartment,
    Class_MyApartment, cimultiInstance, tmApartment);

and

2)
class function CoMyApartment.Create: IMyApartment;
begin
  Result := CreateComObject(CLASS_MyApartment) as IMyApartment;
end;

class function CoMyApartment.CreateRemote(const MachineName: string): IMyApartment;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_MyApartment) as IMyApartment;
end;

Can you throw some light on this issue of mine.
0
Comment
Question by:nayakga
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 8135469
But what is the question ?
0
 

Author Comment

by:nayakga
ID: 8157872
Thanks for replying .I was waiting for somebody to reply.
I want one server instance to service all client requests.
But I see that it creates an instance per client.

How do i avoid from doing so.

Ganesh
0
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 8165610
Well, i dont know much about TComponentFactory.
ciMultiInstance, tmApartment should work.

Normally i use File-New-ActiveX-Automation Object and use TAutoObjectFactory to initialize the server.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:nayakga
ID: 8167196
How would you access remote datasets if I used the way suggested by you.

I tried the way told by you but then I cant use the power of client datsets on client application , and providers and remote datasets on server application.These are (I guess) only available through File-New-Multitier-remote Data module.

0
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 8168839
Will look into it ...
0
 
LVL 21

Accepted Solution

by:
ziolko earned 2000 total points
ID: 8731403
open dconcnfg and set apropriate Launch and access permisions.
ziolko.
0
 

Expert Comment

by:CleanupPing
ID: 9316783
nayakga:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question