Resumen Desarrollo en 3 capas (MTS)   (6 mensajes )

Mensaje enviado por "Fernando De la Cruz" <fdelacruz@viabcp.com>

Ronald:

Adicionalmente a lo que te dijo Pablo, previamente tienes que hacer algunos cambios en tus componentes:

1. Todas tus componentes deben ser "stateless", es decir no deben tener Propiedades, solo utiliza Métodos.
2. Tus Componentes no deben tener interfaz gráfica.
3. Si quieres enviar un mensaje desde el componente utiliza el Err.Raise y capturas todos estos errores en el Cliente.
4. Para pasar parametros utiliza un Arreglo de tipo Variant para enviarlos en un solo viaje.
5. La coneccion a la BD debe estar dentro de cada Método.
6. Utiliza Recordset Desconectados
7. Utiliza la Referencia a MTS (Transaction Server Type Libray) o COM+ (Com+ Services Type Library) para crear las transacciones (Obtener el contexto, aceptar una transacion o Abortarla)

Cualquier consulta, no dudes en pedirla

Saludos,
-------------------------------------------
Fernando De la Cruz Cabello
MCSD
Lima - Perú
--------------------------------------------

Mensaje enviado por Ronald Ubach <rubach@tiempost.com.uy>

Hola a todos, HELP !!
Tengo una aplicación en 2 capas es decir un cliente y las clases que están en dll, hasta acá todo bien y funciona ahora lo que quiero es pasarlo a 3 capas pero no tengo ni idea, a gatas instale el mts en el servidor y ahora ???
Según lo que leí al cliente no le toco nada, tengo que tocar algo en las dll no ??
bueno agradezco si alguien me puede alcanzar algún material o tirarme alguna ayuda.

Mensaje enviado por "Pablo Herrera" <pablo@austral.com.pe>

Hola Ronald, creo que te puedo ayudar, te doy los pasos :
1.- Dependiendo de la version de Windows en tu server deberas abrir tu MTS (en caso de Windows NT4.0) o tu Component Services (en caso de ser 2000 Server).
2.- Debes copiar la Dll, en un directorio de tu servidor.
3.- En la consola de Mts o C.S., debes crear un paquete (click derecho en paquetes, nuevo), y le das crear paquete nuevo, en el nombre, algo descriptivo ejm "Facturacion".
4.- Ahora debes registrar la Dll en el paquete, o incluirla, para eso, la forma mas facil es abrir el explorador de windows, ubicar la DLL y arrastrarla directamente al paquete que has creado.
5.- Listo ahora ya tienes tu paquete en el MTS, pero para que tus clientes puedan acceder a ese paquete, tienes que generar los instaladores, para esto solo le tienes que darle click derecho al paquete y darle la opcion de "Exportar paquete", y sigues las opciones por defecto.
6.- Luego de exportar el paquete, en la carpeta donde se guardo, se creara una carpeta "Client", en caso de ser Windows Nt y dos archivos un MSI, y un Zip en caso de ser 2000 server.
7.- Ahora tan solo deberas pasarte por todos tus clientes ejecutando ese pequeño .exe para que tu app funcione.

Espero te sirva, cualquier consulta me pasas la voz.

------------------------------------------------
Pablo Herrera Rejas
Microsoft Certified Professional
pablo@austral.com.pe
ICQ : 105830399

Mensaje enviado por "Fernando De la Cruz" <fdelacruz@viabcp.com>

Ronald:

Es justamente un punto que me olvidaba, ya que un Componente MTX o COM+ tiene el comportamiento "Just In Time" no debe tener codigo en los Eventos Initialize ni Terminate, y la coneccion se realiza dentro de cada Método.

Lo de CreateObject() lo puedes usar en la APP Cliente, si dentro de un componente instancias otro component debe usar GetObjectContext() y luego CreateInstance().

Saludos,
-------------------------------------------
Fernando De la Cruz Cabello
MCSD
Lima - Perú
--------------------------------------------

Mensaje enviado por Fuentes Garcia Ramiro <rfuentesg@segbancomer.com.mx>

Si, en el disco 2 de Visual Studio Enterprise Edition viene en un directorio "\ntoptpak\X86\win.95"


-----Mensaje original-----
De: Fuentes Garcia Ramiro [mailto:rfuentesg@segbancomer.com.mx]
Enviado el: Martes, 23 de Octubre de 2001 02:55 p.m.
Para: visualbasic-esp@yahoogroups.com
Asunto: RE: (VB-ESP) 3 capas


Si, si se puede, hay un OP para Win9x

Mensaje enviado por Ginez Javier <JGinez@sancorseguros.com>

Estimados compañeros,

Envío documentación de MSDN respecto a los requerimientos para instalar MTS.

Saludos!


Platform SDK: Transaction Server
MTS System Requirements
[This product will work only on Windows NT 4.0 versions and earlier. For Windows 2000 and later, see COM+ (Component Services).]

This section describes the hardware and software requirements for installing MTS, discusses other setup considerations, and describes MTS support on Alpha platforms.

You can install MTS on your computer by:

Using the Windows NT® 4.0 Option Pack to install MTS with Internet Information Server (IIS) or other Option Pack components.
Using the Windows NT 4.0 Option Pack to install MTS without any other Option Pack components.
MTS runs on Windows NT, Windows® 98, and Windows® 95 with DCOM support.

Important: If you are already using IIS 2.0 or IIS 3.0, do not install MTS without installing IIS 4.0 in the Windows NT Option Pack.

To install MTS without other Option Pack components:

Run the Option Pack Setup program. Choose Custom install.
Uncheck all Option Pack components.
Select, but do not click the check box, for Transaction Server.
Click Show Subcomponents.
Check Transaction Server Core Components. This will also check Microsoft Management Console.
Note that choosing the Development Option also installs the Data Access components.

Click OK and continue the setup program.
Hardware Requirements

Before you install Microsoft Transaction Server, make sure that your computer meets the following minimum requirements:

Any Windows NT, Windows 98, or Windows 955 with DCOM support i386-compatible computer or Alpha AXP(tm) computer. See the MTS Readme for the latest information on hardware requirements.
A hard disk with a minimum of 30 megabytes available space for a full installation.
A CD drive.
Any display supported by Windows NT version 4.0 or later or Windows 98.
At least 32 megabytes of memory.
A mouse or other suitable pointing device.
You can run MTS setup unattended using the Windows NT 4.0 Option Pack setup.
Before you run setup unattended, modify the setup file with your setup selections. The unattended setup file (unattend.txt) is located in your \MTS directory.

To run setup unattended, click the Start button, select Run and type the following:

setup /u:unattend.txt.
Software Requirements

MTS software requirements include:

Before you install MTS, you must install Microsoft Windows NT version 4.0 or later, Windows 98, or Windows 955 with DCOM support on your computer.
Failure to install DCOM support for Windows 95 before setting up MTS will result in the following error message:
Setup library mtssetup.dll could not be loaded or the function MTSSetupProc could not be found.
You can install DCOM support for Windows 95 from http://www.microsoft.com/resources/downloads.asp. Note that DCOM support for Windows 95 is installed by Internet Explorer 4.0. Windows 98 includes DCOM support.

If you uninstall MTS on a Windows 95 computer, do not uninstall DCOM support for Windows 95. The Microsoft Distributed Transaction Coordinator (MS DTC), which is installed but not removed by the MTS setup program, requires DCOM support on Windows 95.

If you want to remotely administer a Windows NT computer from a Windows 98 computer, you must install the Remote Registry service for Windows 98. The Remote Registry service allows you to change registry entries for a remote Windows NT computer (given the appropriate permissions). To obtain the Remote Registry service, go to the \Admin\Nettols\RemoteReg subdirectory on the Windows 98 CD. Read the Regserv.txt file for instructions on installing the Remote Registry service.
If you want to use a Microsoft Windows 95 client with MTS, install DCOM for Windows 95. For the latest information on DCOM support for Windows 95, see http://www.microsoft.com/resources/downloads.asp. Note that Windows 98 includes DCOM support.
If you are using Windows NT Server, you must install Windows NT Service Pack 3. You can download Windows NT Service Pack 3 from http://www.microsoft.com/support.
If you want your components to access databases, use Microsoft SQL Server, version 6.5 or later, or another Microsoft Transaction Server-compatible database. Note that SQL Server requires the Windows NT operating system.
It is strongly recommended that you install the SQL Server Service Pack 4 on computers running MTS software. This Service Pack resolves several known problems. You can install SQL Server Service Pack 3 from http://www.microsoft.com/support/.
If you plan to create components with Microsoft Visual Basic®, use Microsoft Visual Basic, Enterprise Edition, version 4.0 or later. It is strongly recommended that you use Visual Basic version 5.0 or later to build your MTS components.
If you use Visual Basic to build your DLL, install the VB addin offered as part of the Transaction Server Custom install setup option. Using the addin will properly refresh the MTS catalog, even after Visual Basic generates new component GUIDs upon compilation. See the MTS Component Requirements section for more information.

If you plan to create components with Microsoft Visual C++®, use version 4.1 or later with the Active Template Libraries (ATL), version 1.1 or later. If you use Visual C++ version 4.1, you must have the Win32® SDK.
If you plan to create and run Java components with MTS, use the Microsoft Virtual Machine for Java installed with IE 4.0 or later. You can download Internet Explorer from http://www.microsoft.com/windows/ie/.
If you plan to create Internet applications, you must use Microsoft Internet Information Server version 4.0 or later and Microsoft Internet Explorer version 4.0 or later.
To use MTS with an Oracle database, see the Setting Up MTS to Access Oracle topic, which provides essential information for making Oracle work with Microsoft Transaction Server.
No Remote Administration of MTS 2.0 Computers from MTS 1.x Computers You cannot remotely administer an MTS 2.0 installation from a computer running a previous version of MTS. Attempting to do so will return an error code or cause the MTS Explorer to terminate unexpectedly.

Use the Advanced Data Connector 1.1 Client
The ADC 1.5 client only works with the Internet Explorer (IE) 4.0. The ADC 1.5 client will not work with any version of Internet Explorer before IE 4.0.

For users of the MTS Adventure Works sample application, check http://www.microsoft.com/data/ado/rds/ for an updated ADC 1.1 client that will work with Internet Explorer version 3.0 or later. You will need to recompile the MTS Adventure Works sample to set a reference to the new ADC 1.5 recordset library (Msador15.dll).

Visual Basic 5.0 Shutdown with MTS 2.0
After installing MTS 2.0, you may see an Access Violation when shutting down Microsoft® Visual Basic® 5.0. This is a known Visual Basic 5.0 bug that can be fixed by installing Visual Studio(tm) Service Pack 2 from http://msdn.microsoft.com/vstudio/. Refer to Knowledge Base article Q167213 for more information about this problem.

Deadlocks on Windows 98 When Using Named Pipes
There is a known problem that may cause deadlocks when using more than approximately 40 Named Pipe connections from a Windows 98 client to MS SQL Server. To fix this problem, change the protocol between the ODBC driver and SQL Server to TCP/IP.

Run the INSTCAT.SQL Script
As a convenience, MTS includes the INSTCAT.SQL script. This script updates the catalog stored procedures for the SQL Server ODBC driver. If you have not done so already, run this script using the SQL Server isql utility. This script resolves any potential mismatch version problems that may occur with SQL Server catalogs.

Installing SQL Server with MTS
You can install SQL Server 6.5 after installing MTS. It is recommended that you install SQL Server 6.5 before installing MTS. If you install SQL Server 6.5 after installing MTS, MTS Setup will attempt to ensure that MS DTC works properly.

Installing MTS 1.0 over MTS 2.0
To install MTS 1.0 on a computer with MTS 2.0 installed, you must remove the following files from your system directory before running MTS 1.0 setup:

%WINDIR%\system32\adme.dll
%WINDIR%\system32\dac.exe
%WINDIR%\system32\dacdll.dll
%WINDIR%\system32\dtccm.dll
%WINDIR%\system32\dtctrace.dll
%WINDIR%\system32\dtctrace.exe
%WINDIR%\system32\dtcuic.dll
%WINDIR%\system32\dtcuis.dll
%WINDIR%\system32\dtcutil.dll
%WINDIR%\system32\dtcxatm.dll
%WINDIR%\system32\enudtc.dll
%WINDIR%\system32\logmgr.dll
%WINDIR%\system32\msdtc.exe
%WINDIR%\system32\msdtc.dll
%WINDIR%\system32\msdtcprx.dll
%WINDIR%\system32\msdtctm.dll
%WINDIR%\system32\dtccfg.cpl
%WINDIR%\system32\svcsrvl.dll
%WINDIR%\system32\xolehlp.dll
%WINDIR%\system32\mmc.exe
%WINDIR%\system32\mmc.ini
%WINDIR%\system32\mmclv.dll
%WINDIR%\system32\mmcndmgr.dll
%WINDIR%\system32\mtxinfr1.dll
%WINDIR%\system32\mtxinfr2.dll
%WINDIR%\system32\mtxclu.dll
%WINDIR%\system32\mtxrn.dll
%WINDIR%\system32\mtxdm.dll

Uninstall Option Removes User-Defined Packages
If you are using a previous version of MTS and would like to retain your user-defined packages, do not use the Uninstall option in the setup program or the Add/Remove Programs service icon in the Control Panel. Uninstalling MTS results in the removal of all user-defined packages. To preserve user-defined packages when upgrading, install MTS over your existing version of MTS.

Incorrect System Package Identity Passwords
If you incorrectly specify a password for the System Package Identity on setup, the Microsoft Transaction Server Explorer will not run. You will get a 80008005 error (server exec failure) back from the catalog server (System package). To fix a bad system password, reinstall Microsoft Transaction Server.

In addition, if you incorrectly specify the password on a System Package Identity, the package won't run. You will get the same 80008005 error. But this time, the client will see this failure HRESULT on a CoCreateInstance or equivalent. To fix this, go back to the Explorer and adjust the package's identity (through the package's Identity tab). User IDs are verified, but passwords are not because of security restrictions in Windows NT.

Alpha Platforms

MTS is supported on Alpha AXP(tm) computers. However, this release of Microsoft Transaction Server for Alpha platforms does not include the following:

Microsoft Visual J++ components and samples
You can find sample Microsoft Visual C++ and Visual Basic components as well as the administrative sample scripts in the \Program Files\Mts\Samples folder.

To validate your MTS installation on Alpha platforms, you can run the Sample Bank application using two computers, an Alpha computer (as a server), and an X86 computer (as a client). See the Setting Up the MTS Sample Bank Application topic for more details.

Platform SDK Release: February 2001 Contact Platform SDK Order a Platform SDK CD Online



--------------------
Javier E. Ginez
Analista de Sistemas



Resumen Resumen

Visual Basic Página de Visual Basic

Página principal Página principal

www.jrubi.com