.NETGURU
COM +
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngmigrate' list.


Suzan Ali
-- Moved from [aspngclient] to [aspngmigrate] by Clint Barton <Click here to reveal e-mail address> --

Hi All,
I am tring to use the Com+ and make my pages transactional and everything
work just fine but my application begin to be unstable and too many errors
related to transation appears
i am using the below steps to configure my application............. anyone
face the above problem...............please help

Use the following process to prepare a class to participate transaction:
    1.    Apply the TransactionAttribute to your class.
    <Transaction(TransactionOption.Required)> Public Class Bar
     Inherits ServicedComponent
     End Class
    2.    Derive your class from the ServicedComponent Class.
    3.    Sign the assembly with a strong name.
        To sign the assembly using attributes create a key pair
using the Sn.exe utility.
        sn -k TestApp.snk

    1.    Add the AssemblyKeyFileAttribute or AssemblyKeyNameAttribute
assembly attribute specifying the name of the file containing the key pair
to sign the assembly with a strong name.
        <assembly: AssemblyKeyFileAttribute("TestApp.snk")>

        The following code example demonstrates several elements of
an automatic transaction

        Imports System.EnterpriseServices

        <TransactionAttribute(TransactionOption.Required)> Public
Class CAction
         Inherits ServicedComponent

         Public Function GetList() As SqlDataReader

         Try
         ContextUtil.SetComplete()
         Return

         Catch objException As Exception
         If Not conSpringNet Is Nothing Then
         If conSpringNet.State = ConnectionState.Open
Then
         conSpringNet.Close()
         conSpringNet = Nothing
         End If
         End If

         'Add Log
         AddLog(objException)

         ContextUtil.SetAbort()

         'Throw Excpetion
         Throw objException
         End Try

         End Function

        'Provides SetComplete behavior in the absence of exceptions.
        <AutoComplete()> Public Function Getinfo() As SqlDataReader

         Try

            Do some database work. Any exception thrown here
aborts the ' transaction; otherwise, transaction commits.
         Return

         Catch objException As Exception
         If Not conSpringNet Is Nothing Then
         If conSpringNet.State = ConnectionState.Open
Then
         conSpringNet.Close()
         conSpringNet = Nothing
         End If
         End If

         'Add Log
         AddLog(objException)

         'Throw Excpetion
         Throw objException
         End Try

         End Function

        End Class

Use the following process to prepare a page to participate transaction:
    4.    Apply the TransactionAttribute to your page (page header).
    5.    Derive your asp application from the ServicedComponent
Class.

thanks,
Suzan

Reply to this message...
 
    
Wally McClure
The question that I have regarding using COM+, are you doing something that
requires distributed transactions. I would suggest against using them unless
you absolutely need them. You get distributed transactions when you use
COM+. I am guessing that there is some type of issue when you make the page
transactional and use COM+ distributed transactions. I have done a bunch of
testing with COM+ in .NET and it seems to work pretty well.

Wally

----- Original Message -----
From: "Suzan Ali" <Click here to reveal e-mail address>
To: "aspngmigrate" <Click here to reveal e-mail address>
Sent: Monday, June 24, 2002 12:12 PM
Subject: [aspngmigrate] COM +

> -- Moved from [aspngclient] to [aspngmigrate] by Clint Barton
<Click here to reveal e-mail address> --
[Original message clipped]

Reply to this message...
 
    
Wally McClure
One thing that I forgot to add, because it was getting late last night, you
can use 'manual' transactions to get support for transactions without the
overhead of COM+. This assumes that you only need to use one datasource,
such as Sql Server, Oracle, DB/2, MSMQ, or other datasource that supports
MSDTC. When using more than one, it is generally accepted that COM+ and
distributed transactions is a good thing to use.

Wally

McClure Development
865-693-3004
118 Durwood Rd.
Knoxville, TN 37922
http://www.mccluredevelopment.com/
Building Scalable Applications with the Microsoft .NET Framework
http://www.scalabilitywith.net/
"Building Highly Scalable Database Applications with .NET"
http://www.wiley.com/cda/product/0,,0764536400,00.html
-- or --
http://www.amazon.com/exec/obidos/ASIN/0764536400/qid=1020081583/sr=8-1/refsr_8_1_1/104-9726427-8447111

-----Original Message-----
From: Wally McClure [mailto:Click here to reveal e-mail address]
Sent: Monday, June 24, 2002 10:53 PM
To: aspngmigrate
Subject: [aspngmigrate] Re: COM +

The question that I have regarding using COM+, are you doing something that
requires distributed transactions. I would suggest against using them unless
you absolutely need them. You get distributed transactions when you use
COM+. I am guessing that there is some type of issue when you make the page
transactional and use COM+ distributed transactions. I have done a bunch of
testing with COM+ in .NET and it seems to work pretty well.

Wally

----- Original Message -----
From: "Suzan Ali" <Click here to reveal e-mail address>
To: "aspngmigrate" <Click here to reveal e-mail address>
Sent: Monday, June 24, 2002 12:12 PM
Subject: [aspngmigrate] COM +

> -- Moved from [aspngclient] to [aspngmigrate] by Clint Barton
<Click here to reveal e-mail address> --
[Original message clipped]

| [aspngmigrate] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmigrate.asp = JOIN/QUIT
Reply to this message...
 
    
RRamirez@belcorporation.com

COM+ HotFix 18.1 solves many issued between .NET and COM+ one of them is
instability, check this kba for more info :
http://support.microsoft.com/support/kb/articles/Q317/5/70.ASP

you can install the hotifx from WindowsUpdate.com
or check this KBA :
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q313582

hih,
Rolando
Click here to reveal e-mail address
Click here to reveal e-mail address

BELCORP Peru
http://www.ebelinternational.com

Life after Napster => http://www.winmx.com , http://www.trippymx.co.uk

Suzan Ali
<suzan@integra Para: "aspngmigrate" <Click here to reveal e-mail address>
nt.com.jo> cc:
Asunto: [aspngmigrate] COM +
24/06/2002
11:12
Por favor,
responda a
"aspngmigrate"

-- Moved from [aspngclient] to [aspngmigrate] by Clint Barton
<Click here to reveal e-mail address> --

Hi All,
I am tring to use the Com+ and make my pages transactional and everything
work just fine but my application begin to be unstable and too many errors
related to transation appears
i am using the below steps to configure my application............. anyone
face the above problem...............please help

Use the following process to prepare a class to participate transaction:
1. Apply the TransactionAttribute to your class.
<Transaction(TransactionOption.Required)> Public Class Bar
Inherits ServicedComponent
End Class
2. Derive your class from the ServicedComponent Class.
3. Sign the assembly with a strong name.
To sign the assembly using attributes create a key
pair
using the Sn.exe utility.
sn -k TestApp.snk

1. Add the AssemblyKeyFileAttribute or
AssemblyKeyNameAttribute
assembly attribute specifying the name of the file containing the key pair
to sign the assembly with a strong name.
<assembly: AssemblyKeyFileAttribute("TestApp.snk")>

The following code example demonstrates several
elements of
an automatic transaction

Imports System.EnterpriseServices

<TransactionAttribute(TransactionOption.Required)>
Public
Class CAction
Inherits ServicedComponent

Public Function GetList() As SqlDataReader

Try
ContextUtil.SetComplete()
Return

Catch objException As Exception
If Not conSpringNet Is Nothing Then
If conSpringNet.State =
ConnectionState.Open
Then
conSpringNet.Close()
conSpringNet = Nothing
End If
End If

'Add Log
AddLog(objException)

ContextUtil.SetAbort()

'Throw Excpetion
Throw objException
End Try

End Function

'Provides SetComplete behavior in the absence of
exceptions.
<AutoComplete()> Public Function Getinfo() As
SqlDataReader

Try

Do some database work. Any exception thrown
here
aborts the ' transaction; otherwise, transaction commits.
Return

Catch objException As Exception
If Not conSpringNet Is Nothing Then
If conSpringNet.State =
ConnectionState.Open
Then
conSpringNet.Close()
conSpringNet = Nothing
End If
End If

'Add Log
AddLog(objException)

'Throw Excpetion
Throw objException
End Try

End Function

End Class

Use the following process to prepare a page to participate transaction:
4. Apply the TransactionAttribute to your page (page
header).
5. Derive your asp application from the ServicedComponent
Class.

thanks,
Suzan
| [aspngmigrate] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmigrate.asp = JOIN/QUIT

Reply to this message...
 
    
Suzan Ali
i insall the SP and it's still unstable
any other ideas,
thanks,
Suzan

-----Original Message-----
From: Click here to reveal e-mail address [mailto:Click here to reveal e-mail address]
Sent: Tuesday, June 25, 2002 5:35 PM
To: aspngmigrate
Subject: [aspngmigrate] Re: COM +

COM+ HotFix 18.1 solves many issued between .NET and COM+ one of them is
instability, check this kba for more info :
http://support.microsoft.com/support/kb/articles/Q317/5/70.ASP

you can install the hotifx from WindowsUpdate.com
or check this KBA :
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q313582

hih,
Rolando
Click here to reveal e-mail address
Click here to reveal e-mail address

BELCORP Peru
http://www.ebelinternational.com

Life after Napster => http://www.winmx.com , http://www.trippymx.co.uk

Suzan Ali

<suzan@integra Para: "aspngmigrate"
<Click here to reveal e-mail address>
nt.com.jo> cc:

Asunto: [aspngmigrate] COM +

24/06/2002

11:12

Por favor,

responda a

"aspngmigrate"

-- Moved from [aspngclient] to [aspngmigrate] by Clint Barton
<Click here to reveal e-mail address> --

Hi All,
I am tring to use the Com+ and make my pages transactional and everything
work just fine but my application begin to be unstable and too many errors
related to transation appears
i am using the below steps to configure my application............. anyone
face the above problem...............please help

Use the following process to prepare a class to participate transaction:
1. Apply the TransactionAttribute to your class.
<Transaction(TransactionOption.Required)> Public Class Bar
Inherits ServicedComponent
End Class
2. Derive your class from the ServicedComponent Class.
3. Sign the assembly with a strong name.
To sign the assembly using attributes create a key
pair
using the Sn.exe utility.
sn -k TestApp.snk

1. Add the AssemblyKeyFileAttribute or
AssemblyKeyNameAttribute
assembly attribute specifying the name of the file containing the key pair
to sign the assembly with a strong name.
<assembly: AssemblyKeyFileAttribute("TestApp.snk")>

The following code example demonstrates several
elements of
an automatic transaction

Imports System.EnterpriseServices

<TransactionAttribute(TransactionOption.Required)>
Public
Class CAction
Inherits ServicedComponent

Public Function GetList() As SqlDataReader

Try
ContextUtil.SetComplete()
Return

Catch objException As Exception
If Not conSpringNet Is Nothing Then
If conSpringNet.State =
ConnectionState.Open
Then
conSpringNet.Close()
conSpringNet = Nothing
End If
End If

'Add Log
AddLog(objException)

ContextUtil.SetAbort()

'Throw Excpetion
Throw objException
End Try

End Function

'Provides SetComplete behavior in the absence of
exceptions.
<AutoComplete()> Public Function Getinfo() As
SqlDataReader

Try

Do some database work. Any exception thrown
here
aborts the ' transaction; otherwise, transaction commits.
Return

Catch objException As Exception
If Not conSpringNet Is Nothing Then
If conSpringNet.State =
ConnectionState.Open
Then
conSpringNet.Close()
conSpringNet = Nothing
End If
End If

'Add Log
AddLog(objException)

'Throw Excpetion
Throw objException
End Try

End Function

End Class

Use the following process to prepare a page to participate transaction:
4. Apply the TransactionAttribute to your page (page
header).
5. Derive your asp application from the ServicedComponent
Class.

thanks,
Suzan
| [aspngmigrate] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmigrate.asp = JOIN/QUIT

| [aspngmigrate] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmigrate.asp = JOIN/QUIT

Reply to this message...
 
 
System.Data.ConnectionState
System.Data.SqlClient.SqlDataReader
System.EnterpriseServices.ContextUtil
System.EnterpriseServices.ServicedComponent
System.EnterpriseServices.TransactionAttribute
System.EnterpriseServices.TransactionOption
System.Reflection.AssemblyKeyFileAttribute
System.Reflection.AssemblyKeyNameAttribute




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification