No Object Pooling in MTS for VB COM objects ??!! 
Author Message
 No Object Pooling in MTS for VB COM objects ??!!

1. I have just been told that COM objects compiled using VB can not take
advantage of MTS object pooling capability. This is contrary to everything
that I have been led to believe. I am wondering if anyone could collaborate
this view?

2. Again it is related to MTS for VB COM objects. I have always coded VB COM
objects without using prototype. As I understand, VB IDE would take care of
registering type library for the COM dll. Now I have been told to build an
empty class without implementation and then implement methods in another COM
objects. Even though I have no problem with that, I personally find it a
rather pointless exercise since if I were after polymorphism, I'd be using
C++/Java, not VB. However, I was told that if I were to deploy MTS COM
objects remotely, I would need the empty class for creating type libraries.
This just doesn't sound right. Anyone has got some idea as to what the heck
it is for?

TIA



Tue, 21 Oct 2003 15:02:14 GMT  
 No Object Pooling in MTS for VB COM objects ??!!
That's true 'cos VB can't do free threading (VB1-VB6) - VB .NET promises to,
though ...


Quote:
> 1. I have just been told that COM objects compiled using VB can not take
> advantage of MTS object pooling capability. This is contrary to everything
> that I have been led to believe. I am wondering if anyone could
collaborate
> this view?

> 2. Again it is related to MTS for VB COM objects. I have always coded VB
COM
> objects without using prototype. As I understand, VB IDE would take care
of
> registering type library for the COM dll. Now I have been told to build an
> empty class without implementation and then implement methods in another
COM
> objects. Even though I have no problem with that, I personally find it a
> rather pointless exercise since if I were after polymorphism, I'd be using
> C++/Java, not VB. However, I was told that if I were to deploy MTS COM
> objects remotely, I would need the empty class for creating type
libraries.
> This just doesn't sound right. Anyone has got some idea as to what the
heck
> it is for?

> TIA



Tue, 21 Oct 2003 19:39:57 GMT  
 No Object Pooling in MTS for VB COM objects ??!!
1. Yep, true.  Object Pooling doesn't exist in MTS 2.0, and is only
available to C++ in COM+.  Roll on .Net...

2. The 'right' way to develop a COM object is to define the interface in
IDL, compile in into a .TLB file and implement it in your VB DLL.  Matt
Curland (http://www.powervb.com/) provides a great GUI tool so you don't
have to learn IDL. The next best option is the one you described with empty
prototype classes.  The worst option is to use public methods on the default
interface.

Why?  If you ever want to change any of the methods on your objects, with
only one interface available you're stuffed.  As you almost certainly know
changing the method signitures will break binary compatibility, but what you
may not know is : if you add a method to an interface, VB will generate a
second interface for you and forward one to the other under the covers,
without telling you.  Still can't see the problem ? Check out MSKB articles
Q241637, Q222634 and Q283876 for a whole new world of DLL hell!

Paul Smith
IT Consultant
Some large company in the UK.


Quote:
> 1. I have just been told that COM objects compiled using VB can not take
> advantage of MTS object pooling capability. This is contrary to everything
> that I have been led to believe. I am wondering if anyone could
collaborate
> this view?

> 2. Again it is related to MTS for VB COM objects. I have always coded VB
COM
> objects without using prototype. As I understand, VB IDE would take care
of
> registering type library for the COM dll. Now I have been told to build an
> empty class without implementation and then implement methods in another
COM
> objects. Even though I have no problem with that, I personally find it a
> rather pointless exercise since if I were after polymorphism, I'd be using
> C++/Java, not VB. However, I was told that if I were to deploy MTS COM
> objects remotely, I would need the empty class for creating type
libraries.
> This just doesn't sound right. Anyone has got some idea as to what the
heck
> it is for?

> TIA



Wed, 22 Oct 2003 03:12:30 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. MTS Object Pooling & VB Components

2. Call VB DLL or COM object from within VB COM object or EXE

3. MTS Object Pooling

4. com object will not read registry when com object called from asp (vb works fine)

5. COM-Object in ASP with COM-Object as parameter

6. COM-Object in ASP with COM-Object as Parameter

7. Access a COM object of a COM object?

8. Accessing a COM object of a COM object

9. COM Object-Out of stack space on executing/shell exe from com object

10. Using COM Objects from VB (Object Picker Dialog)

11. persistant com objects in MTS

12. MTS Problem w/ VB6 COM Object

 

 
Powered by phpBB® Forum Software