Update reference documentation generation tools to get source highlighting [SPRNET-1045]
This commit is contained in:
@@ -1,8 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<chapter id="services">
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<chapter xml:id="services" xmlns="http://docbook.org/ns/docbook" version="5">
|
||||
<title>.NET Enterprise Services</title>
|
||||
|
||||
<sect1 id="services-introduction">
|
||||
<sect1 xml:id="services-introduction">
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>Spring's .NET Enterprise Services support allows you to export a
|
||||
@@ -16,14 +33,14 @@
|
||||
Programatically, as you would with any third party library.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="services-servicedcomponents">
|
||||
<sect1 xml:id="services-servicedcomponents">
|
||||
<title>Serviced Components</title>
|
||||
|
||||
<para>Services components in .NET are able to use COM+ services such as
|
||||
declarative and distributed transactions, role based security, object
|
||||
pooling messaging. To access these services your class needs to derive
|
||||
from the class
|
||||
<classname>System.EnterpriseServices.ServicedComponent</classname>, adorn
|
||||
<literal>System.EnterpriseServices.ServicedComponent</literal>, adorn
|
||||
your class and assemblies with relevant attributes, and configure your
|
||||
application by registering your serviced components with the COM+ catalog.
|
||||
The overall landscape of accessing and using COM+ services within .NET
|
||||
@@ -50,7 +67,7 @@
|
||||
linkend="entsvc-example">NET Enterprise Services example.</link></para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="services-serverside">
|
||||
<sect1 xml:id="services-serverside">
|
||||
<title>Server Side</title>
|
||||
|
||||
<para>One of the main challenges for the exporting of a serviced component
|
||||
@@ -64,7 +81,7 @@
|
||||
<listitem>
|
||||
|
||||
|
||||
<classname>Spring.Enterprise.ServicedComponentExporter</classname>
|
||||
<literal>Spring.Enterprise.ServicedComponentExporter</literal>
|
||||
|
||||
is responsible for exporting a single component and making sure that it derives from ServicedComponent class. It also allows you to specify class-level and method-level attributes for the component in order to define things such as transactional behavior, queuing, etc.
|
||||
</listitem>
|
||||
@@ -72,7 +89,7 @@
|
||||
<listitem>
|
||||
|
||||
|
||||
<classname>Spring.Enterprise.EnterpriseServicesExporter</classname>
|
||||
<literal>Spring.Enterprise.EnterpriseServicesExporter</literal>
|
||||
|
||||
corresponds to a COM+ application, and it allows you to specify list of components that should be included in the application, as well as the application name and other assembly-level attributes
|
||||
</listitem>
|
||||
@@ -81,7 +98,7 @@
|
||||
<para>Let's say that we have a simple service interface and implementation
|
||||
class, such as these:</para>
|
||||
|
||||
<programlisting>namespace MyApp.Services
|
||||
<programlisting language="csharp">namespace MyApp.Services
|
||||
{
|
||||
public interface IUserManager
|
||||
{
|
||||
@@ -116,7 +133,7 @@
|
||||
<para>And the corresponding object definition for it in the application
|
||||
context config file:</para>
|
||||
|
||||
<programlisting><object id="userManager" type="MyApp.Services.SimpleUserManager">
|
||||
<programlisting language="myxml"><object id="userManager" type="MyApp.Services.SimpleUserManager">
|
||||
<property name="UserDao" ref="userDao"/>
|
||||
</object></programlisting>
|
||||
|
||||
@@ -125,7 +142,7 @@
|
||||
to export our service using the exporter
|
||||
<literal>ServicedComponentExporter</literal> as shown below</para>
|
||||
|
||||
<programlisting><object id="MyApp.EnterpriseServices.UserManager" type="Spring.Enterprise.ServicedComponentExporter, Spring.Services">
|
||||
<programlisting language="myxml"><object id="MyApp.EnterpriseServices.UserManager" type="Spring.Enterprise.ServicedComponentExporter, Spring.Services">
|
||||
<property name="TargetName" value="userManager"/>
|
||||
<property name="TypeAttributes">
|
||||
<list>
|
||||
@@ -152,7 +169,7 @@
|
||||
<para>The next thing we need to do is configure an exporter for the COM+
|
||||
application that will host our new component:</para>
|
||||
|
||||
<programlisting><object id="MyComponentExporter" type="Spring.Enterprise.EnterpriseServicesExporter, Spring.Services">
|
||||
<programlisting language="myxml"><object id="MyComponentExporter" type="Spring.Enterprise.EnterpriseServicesExporter, Spring.Services">
|
||||
<property name="ApplicationName" value="My COM+ Application"/>
|
||||
<property name="Description" value="My enterprise services application."/>
|
||||
<property name="AccessControl">
|
||||
@@ -182,18 +199,18 @@
|
||||
AccessControl and Roles properties.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="services-clientside">
|
||||
<sect1 xml:id="services-clientside">
|
||||
<title>Client Side</title>
|
||||
|
||||
<para>Because serviced component classes are dynamically generated and
|
||||
registered, you cannot instantiate them in your code using the new
|
||||
operator. Instead, you need to use
|
||||
<classname>Spring.Enterprise.ServicedComponentFactory</classname>
|
||||
<literal>Spring.Enterprise.ServicedComponentFactory</literal>
|
||||
definition, which also allows you to specify the configuration template
|
||||
for the component as well as the name of the remote server the component
|
||||
is running on, if necessary. An example is shown below</para>
|
||||
|
||||
<programlisting><object id="enterpriseUserManager" type="Spring.Enterprise.ServicedComponentFactory, Spring.Services">
|
||||
<programlisting language="myxml"><object id="enterpriseUserManager" type="Spring.Enterprise.ServicedComponentFactory, Spring.Services">
|
||||
<property name="Name" value="MyApp.EnterpriseServices.UserManager"/>
|
||||
<property name="Template" value="userManager"/>
|
||||
</object></programlisting>
|
||||
|
||||
Reference in New Issue
Block a user