Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object Spins

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I have 10 components in a Package in COM+/WIN2K.
I have a strange problem. 5 of my components spins
first and everything started spinning now.
Anybody knows why this is happenning??

Appreciate all help.
 
be little more clear ... if u set to view the status of the component in com+ and when some of u'r program tries to access the component then that particular component will spin .. it is a indication that it is in use .. that's it .. what is the problem actually???

srinu
 
Thank you.
I have a package with 10 components and it is understood
that when the components are instatiated it spins.But
why it does not stop even when not in use??
It spins ans spins for ever and the CPU is pegged at
100%
It works but does not stop spinning.
 
It means that once u'r object is activated it is not getting distroyed ...
Then u need to check u'r code again .... if u r using object context then be sure to distroy the object in the event ...
ObjectControl_Deactivate()

don't use Class_Initialize() and Class_Terminate() procedures ...



 
You seem to understand my problem very well.
Is it enough if I just give this in my objects??
Thank's alot.

Private Sub ObjectControl_Activate()
On Error GoTo err_ObjectControl_Activate
Const cstrProcedureName As String = "ObjectControl_Activate"

Set mobjCTX = GetObjectContext

exit_ObjectControl_Activate:
Exit Sub

err_ObjectControl_Activate:
LogError Err, Me, "ObjectControl_Activate", Erl
End Sub

Private Function ObjectControl_CanBePooled() As Boolean
On Error GoTo err_ObjectControl_CanBePooled
Const cstrProcedureName As String = "ObjectControl_CanBePooled"

ObjectControl_CanBePooled = False

exit_ObjectControl_CanBePooled:
Exit Function
err_ObjectControl_CanBePooled:
LogError Err, Me, "ObjectControl_CanBePooled", Erl
End Function

Private Sub ObjectControl_Deactivate()
On Error GoTo err_ObjectControl_Deactivate
Const cstrProcedureName As String = "ObjectControl_Deactivate"
Set mobjCTX = Nothing

exit_ObjectControl_Deactivate:
Exit Sub
err_ObjectControl_Deactivate:
LogError Err, Me, "ObjectControl_Deactivate", Erl
End Sub
 
U'r code seems to be correct ... can u just give one function which u r calling .....

In ObjectControl_Deactivate() use on error resume next because if any error occurs before setting the object to nothing it will be active ...

regards,
srinu...
 
It looks like there could be a problem in Object_control deactivate.
As there is no functionality problem and only performance problem, why do
not we add a trace code just before and after set object=nothing instead
of changing the On Error resume next.
I had appreciate if you have a better solution.

Thank's alot.
 
Your object_control interface that you're implementing is in a class, right? And everyone that uses that class is setting their object variables to nothing when they're done with it? Because if they're not, the object will continue to stay alive, and spin the ball.

Chip H.
 
What is the relevance of Retain in Memory and
Unattended execution option in VB??
Does it affect the performance??
CPU Utilization??

Thank's alot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top