Solved

Com+ Application Hangs

Posted on 2001-08-22
12
277 Views
Last Modified: 2013-11-25
I'm running into an issue with several COM+ applications that I'm trying to deploy.  For testing purposes the application contains a series of simple updates to a database and makes use of Transactions.  It was coded in VB 6 and setup as a COM+ app.  

I've then created a client (also in VB) that calls the object and the associated method.  The issue I'm having is that the first time the client is run things go smoothly and everything works as planned.  However if I try to run the client application again it hangs while trying to instantiate the component and I get an error stating:

Object server is stopping when Ole Service Contacts it

-I've searched MSFT and the other sites but haven't really found anything to point me towards my error.  Any thoughts about what might be the culprit?

thanks
-Matt
0
Comment
Question by:mattyk
  • 5
  • 5
  • 2
12 Comments
 
LVL 7

Expert Comment

by:Z_Beeblebrox
ID: 6413374
Hi,

Did you set your class in COM+ to SingleUse or something like that? Not sure if it would make a difference...

Zaphod.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6413536
<ping>.. Listening
0
 
LVL 5

Author Comment

by:mattyk
ID: 6413648
Nope.  Also the components will work just fine until I set their Transaction Support to Requires or Requires New and then they begin hanging.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 5

Expert Comment

by:rkot2000
ID: 6413661
can you post some code I devepoped for mts and com+ maybe i can see someting
0
 
LVL 5

Author Comment

by:mattyk
ID: 6413849
Yeah actually it's pretty simple.
Public Function UpdateOrderDetail() As String
   
   

    Dim intRowsReturned As Integer
    Dim strSQL As String
    Dim objInformixConn As ADODB.Connection
    Dim strInformix As String

    strInformix = "DSN=Xxx"

    intRowsReturned = 0
    strSQL = "Update orders set resp_sent='Y' where order_id='895265'"

    Set objInformixConn = New ADODB.Connection

'    objInformixConn.Open strInformix
'    objInformixConn.Execute strSQL, intRowsReturned
'    objInformixConn.Close

    Set objInformixConn = Nothing


    GetObjectContext.SetComplete
    UpdateOrderDetail = "Success"

End Function

If you uncomment the portion that connects to the DB the component will hang if it's part of a Transaction (if it's not part of transaction it will run reliably)

-matt

0
 
LVL 5

Accepted Solution

by:
rkot2000 earned 100 total points
ID: 6413882
maybe you have old informix odbc drvier

When I did development for oracle 8.1.6  I used ado trunsactions, you try it

Upgrade MTS 2.0 DTC to Support IBM DB2 and Informix Databases

http://support.microsoft.com/support/kb/articles/Q192/6/81.ASP?LN=EN-US&SD=gn&FR=0&qry=informix&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=TRS
0
 
LVL 5

Author Comment

by:mattyk
ID: 6414154
Yeah I'm in the process of trying to move things over to ADo transactions instead but the catch is for the production app that I'm building I was counting on being a two phase commit to Informix and Oracle, hence the need to use COM+ transactions.

As for the drivers I've already updated to the supported drivers (without them I got a different set of error messages :) )

thanks for your help so far
Matt
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6414205
did you apply all fixes for oracle ?
did you play with connection pooling for informix ?
try disable connection pooling.
did you create your com+ package as sever package or as client library ?
0
 
LVL 5

Author Comment

by:mattyk
ID: 6414334
did you apply all fixes for oracle ?
I'm not even really using Oracle at this point in the test

did you play with connection pooling for informix ?
yeah I thought of that but pooling is already disabled

did you create your com+ package as sever package or as client library ?
I tried it both ways with no success, it still hung regardless of the setting

-matt
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6414379
my last idea : check transaction timeout property for COM +
in one application it was set one sec.
0
 
LVL 7

Expert Comment

by:Z_Beeblebrox
ID: 6414664
Hi,

Do you have COM+ connection pooling enabled? What about JIT? I would try running it with both disabled.

Zaphod.
0
 
LVL 5

Author Comment

by:mattyk
ID: 6418115
Well folks in the end I developed a workaround with ADO transactions instead so I will accpeting that as the answer as it provided an acceptable workaround.

-matt
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Explain Unit of Work pattern 2 63
message box in access 4 46
Need a complete list of ASP.NET page load events 3 47
vbModal 12 53
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

810 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