mattyk
asked on
Com+ Application Hangs
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
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
<ping>.. Listening
ASKER
Nope. Also the components will work just fine until I set their Transaction Support to Requires or Requires New and then they begin hanging.
can you post some code I devepoped for mts and com+ maybe i can see someting
ASKER
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.SetComple te
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
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.SetComple
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
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 ?
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 ?
ASKER
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
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
my last idea : check transaction timeout property for COM +
in one application it was set one sec.
in one application it was set one sec.
Hi,
Do you have COM+ connection pooling enabled? What about JIT? I would try running it with both disabled.
Zaphod.
Do you have COM+ connection pooling enabled? What about JIT? I would try running it with both disabled.
Zaphod.
ASKER
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
-matt
Did you set your class in COM+ to SingleUse or something like that? Not sure if it would make a difference...
Zaphod.