> what is the difrrence between a dll that will run in the COM+ as
> "application" or as "server"?
> is there a difrence in code?
> does any 1 have a basic example for both instances?
You might be confusing COM+'s use of the term "Application" with the common
use of the term - that of a single .exe or program. Also the terms
"application" and "service" are not exclusive, ie, there is a "Service
Application" or a "Library Application".
In COM+ the main unit is called an "Application". It is a set of
adminstrative information/data about components that work together. In the
older MTS this data was called a 'package'. (A term I liked better, but MS
change it with COM+) So think of COM+'s 'Application' as a 'Package'. A COM+
Application then isn't just a single .exe, it includes ALL the elements
needed to do a job - registry, components, type libraries, etc.
Note: all COM+ components are DLLs.
A "COM+ Service Application" runs in a separate address space than then
client. Either on the same box or remotely. This is similar to what an
ActiveX .EXE would be in COM.
A "COM+ Library Application" runs in the same address space as the client.
Similar to how we would use an ActiveX DLL.
So whether Service or Library is purely a design-time decision. You may
write different code for components that are to operate in one or the other
environment, but often not. The difference is what your component is doing
and how COM+ handles the infrastructure to produce the desired effect.
For example, if a component is going to be used within a Service
Application, then COM+ needs to setup a proxy for the client and an
interceptor (dllhost) in the component's address space and create a RPC
Channel for them to communicate. If in a Library Application, the COM+ will
create a Intercetor in the client's space.
Warning: overly simplified. But that's why you have to categorize your
packaged 'application' when you configure COM+.
hth
-ralph
pelegk1 - 10 Sep 2008 22:03 GMT
Hi first thanks alot!
its very lightning explenation!.
as much as i understand in the level of code there is no diffrence, and the
only diffrence for the "server application" that it can be reloaded using the
"shut down" option, or there are more difrences betwen "server" and "kibrary"
thnaks again
Peleg
> > what is the difrrence between a dll that will run in the COM+ as
> > "application" or as "server"?
[quoted text clipped - 38 lines]
> hth
> -ralph
Ralph - 10 Sep 2008 22:26 GMT
> Hi first thanks alot!
> its very lightning explenation!.
> as much as i understand in the level of code there is no diffrence, and the
> only diffrence for the "server application" that it can be reloaded using the
> "shut down" option, or there are more difrences betwen "server" and "kibrary"
Well there are lots of "differences", mostly dealing with an attribute that
is not applicable to the other. Plus don't forget COM+ provides multiple
services - transactions, message queues, load balancing, ... Each of these
will have 'differences'.
You will be better off getting a good book or just playing with versions of
each.
-ralph
pelegk1 - 10 Sep 2008 23:52 GMT
thanks again!
can u recomand of a book?
thanks
peleg
> > Hi first thanks alot!
> > its very lightning explenation!.
[quoted text clipped - 14 lines]
>
> -ralph
Ralph - 11 Sep 2008 01:24 GMT
> thanks again!
> can u recomand of a book?
"COM+ Programming with Visual Basic, 1st Edition" O'Reilly
(Don't know if there ever was a 2nd Edition.)
"Scot Hillier's COM+ Programming with Visual Basic" Sams White Book Series
Are two I have. However, most practical programming examples of using COM+
will be found in chapters or sections in books that cover a specific area -
such as enterprise databases and distributed applications. COM+ isn't a
single facility as much as it is tool adaptable to a wide range of
solutions.
So once you get a feel for the basics, then you need to examine those books
that cover YOUR specific areas of interest.
hth
-ralph