web server - Borland Technical Publications
web server - Borland Technical Publications web server - Borland Technical Publications
Deployment Descriptors for the Resource Adapter Configuring ra-borland.xml The ra-borland.xml file contains information required for deploying a Resource Adapter to the Borland Enterprise Server. Certain attributes need to be specified in this file in order to deploy the RAR file. This functionality is consistent with the equivalent .xml extensions for EJBs, EARs, WARs, and client components for the Borland Enterprise Server. Until Borland-specific deployment properties are provided in the ra.borland.xml file, the RAR cannot be deployed to the server. The following attributes must be specified first in ra-borland.xml: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ Name of the connection factory Description of the connection factory JNDI name bound to the connection factory Reference to a separately deployed connection factory that contains Resource Adapter components which can then be shared with the current Resource Adapter. Directory where all shared libraries should be copied Connection pool properties: ■ ■ ■ busy-timeout: the number of seconds to wait before a busy connection is released. The default is 600 seconds idle-timeout: a pooled connection remaining in an idle state for a period of time longer than this timeout value should be closed. All idle connections are checked for expiration every 60 seconds. The value of the idle-timeout is given in seconds. The default is 600 seconds. wait-timeout: the number of seconds to wait for a free connection. The default is 30 seconds. Values for configuration properties defined in a element of the Sun standard Resource Adapter deployment descriptor Mapping of security principals for Resource Adapter/EIS sign-on processing. This mapping identifies resource principals to be used when requesting EIS connections for applications that use container-managed security and for EIS connections requested during initial deployment. A flag to indicate whether logging is required for the ManagedConnectionFactory or ManagedConnection classes. The file to store logging information for the two aforementioned classes Configuring the element in ra-borland.xml The optional element allows you to associate multiple deployed Resource Adapters with a single deployed Resource Adapter. This provides for linking and reusing resources already configured in a base Resource Adapter to another Resource Adapter, modifying only a subset of attributes. Use of the element avoids duplication of resources (for example, classes, JARs, images, etc.) where possible. Any values defined in the base Resource Adapter deployment are inherited by the linked Resource Adapter unless otherwise specified. Chapter 27: Using VisiConnect 267
Developing the Resource Adapter Configuring the Security Map To use container-managed sign-on, the Borland Enterprise Server must identify a resource role and then request the connection to the EIS on behalf of the resource role. To make this identification, the server looks for a security map specified with the element in the ra-borland.xml descriptor file. This security map builds the required associations between the server's user roles (Borland Enterprise Server users with identities defined in a security realm) and resource roles (users known to the Resource Adapter and/or EIS). See “Security Map” above for details on using the Security Map. Developing the Resource Adapter This section describes how to develop a Connectors 1.0-compliant Resource Adapter. Resource Adapters must implement the following system contract requirements, discussed in detail below: ■ ■ ■ ■ Connection management Security management Transaction management Packaging and deployment Connection management Note The connection management contract for the resource adapter specifies a number of classes and interfaces necessary for providing the system contract. The resource adapter must implement the following interfaces: ■ javax.resource.spi.ManagedConnection ■ javax.resource.spi.ManagedConnectionFactory ■ javax.resource.spi.ManagedConnectionMetaData ■ ■ The ManagedConnection implementation provided by the Resource Adapter must, in turn, supply implementations of the following interfaces and classes to provide support to the application server. It is the application server which will ultimately be managing the connection and associated transactions. If your environment is non-managed (that is, not managed by the application server), you are not required to use these interfaces or classes. javax.resource.spi.ConnectionEvent javax.resource.spi.ConnectionEventListener In addition, support for error logging and tracing must be provided by implementing the following methods in the Resource Adapter: ■ ManagedConnectionFactory.setLogWriter() ■ ManagedConnectionFactory.getLogWriter() ■ ManagedConnection.setLogWriter() ■ ManagedConnection.getLogWriter() The resource adapter must also provide a default implementation of the javax.resource.spi.ConnectionManager interface for cases in which the Resource Adapter is used in a non-managed two-tier application scenario. A default implementation of ConnectionManager enables the Resource Adapter to provide services specific to itself. These services can include connection pooling, error logging and 268 BES Developer’s Guide
- Page 227 and 228: JMS and Transactions and its accomp
- Page 229 and 230: JMS and Transactions For instance:
- Page 231 and 232: 220 BES Developer’s Guide
- Page 233 and 234: Configuring JMS administered object
- Page 235 and 236: Tibco Creating Clustered JMS Servic
- Page 237 and 238: Sonic serverUrl String localhost:72
- Page 239 and 240: Sonic Creating Clustered JMS Servic
- Page 241 and 242: OpenJMS Even though OpenJMS can be
- Page 243 and 244: OpenJMS Important If you use OpenJM
- Page 245 and 246: OpenJMS openjms.clean_messages_on_s
- Page 247 and 248: OpenJMS Table 24.1 Property Name De
- Page 249 and 250: Other JMS providers The following a
- Page 251 and 252: 240 BES Developer’s Guide
- Page 253 and 254: Creating the Interceptor Class For
- Page 255 and 256: Creating the JAR file Creating the
- Page 257 and 258: Components Components The Connector
- Page 259 and 260: System Contracts Connection Managem
- Page 261 and 262: System Contracts Security Managemen
- Page 263 and 264: Common Client Interface (CCI) Conne
- Page 265 and 266: Packaging and Deployment Figure 26.
- Page 267 and 268: Resource Adapters Resource Adapters
- Page 269 and 270: Connection management Connection ma
- Page 271 and 272: Security management with the Securi
- Page 273 and 274: Security management with the Securi
- Page 275 and 276: Resource Adapter overview Note Reso
- Page 277: Deployment Descriptors for the Reso
- Page 281 and 282: Deploying the Resource Adapter Pack
- Page 283 and 284: Application development overview 8
- Page 285 and 286: Application development overview //
- Page 287 and 288: Application development overview
- Page 289 and 290: Other Considerations Other Consider
- Page 291 and 292: Other Considerations To illustrate,
- Page 293 and 294: Other Considerations } } { cf = new
- Page 295 and 296: General syntax and usage General sy
- Page 297 and 298: Syntax and usage for iastool Table
- Page 299 and 300: Syntax and usage for java2iiop Exam
- Page 301 and 302: Syntax and usage for appclient Tabl
- Page 303 and 304: Building and running the BES exampl
- Page 305 and 306: Using the iastool command-line tool
- Page 307 and 308: Using the iastool command-line tool
- Page 309 and 310: Using the iastool command-line tool
- Page 311 and 312: Using the iastool command-line tool
- Page 313 and 314: Using the iastool command-line tool
- Page 315 and 316: Using the iastool command-line tool
- Page 317 and 318: Using the iastool command-line tool
- Page 319 and 320: Using the iastool command-line tool
- Page 321 and 322: Using the iastool command-line tool
- Page 323 and 324: Using the iastool command-line tool
- Page 325 and 326: Using the iastool command-line tool
- Page 327 and 328: Using the iastool command-line tool
Developing the Resource Adapter<br />
Configuring the Security Map<br />
To use container-managed sign-on, the <strong>Borland</strong> Enterprise Server must identify a<br />
resource role and then request the connection to the EIS on behalf of the resource role.<br />
To make this identification, the <strong>server</strong> looks for a security map specified with the<br />
element in the ra-borland.xml descriptor file. This security map builds<br />
the required associations between the <strong>server</strong>'s user roles (<strong>Borland</strong> Enterprise Server<br />
users with identities defined in a security realm) and resource roles (users known to the<br />
Resource Adapter and/or EIS). See “Security Map” above for details on using the<br />
Security Map.<br />
Developing the Resource Adapter<br />
This section describes how to develop a Connectors 1.0-compliant Resource Adapter.<br />
Resource Adapters must implement the following system contract requirements,<br />
discussed in detail below:<br />
■<br />
■<br />
■<br />
■<br />
Connection management<br />
Security management<br />
Transaction management<br />
Packaging and deployment<br />
Connection management<br />
Note<br />
The connection management contract for the resource adapter specifies a number of<br />
classes and interfaces necessary for providing the system contract. The resource<br />
adapter must implement the following interfaces:<br />
■<br />
javax.resource.spi.ManagedConnection<br />
■<br />
javax.resource.spi.ManagedConnectionFactory<br />
■<br />
javax.resource.spi.ManagedConnectionMetaData<br />
■<br />
■<br />
The ManagedConnection implementation provided by the Resource Adapter must,<br />
in turn, supply implementations of the following interfaces and classes to provide<br />
support to the application <strong>server</strong>. It is the application <strong>server</strong> which will ultimately be<br />
managing the connection and associated transactions.<br />
If your environment is non-managed (that is, not managed by the application<br />
<strong>server</strong>), you are not required to use these interfaces or classes.<br />
javax.resource.spi.ConnectionEvent<br />
javax.resource.spi.ConnectionEventListener<br />
In addition, support for error logging and tracing must be provided by implementing the<br />
following methods in the Resource Adapter:<br />
■<br />
ManagedConnectionFactory.setLogWriter()<br />
■<br />
ManagedConnectionFactory.getLogWriter()<br />
■<br />
ManagedConnection.setLogWriter()<br />
■<br />
ManagedConnection.getLogWriter()<br />
The resource adapter must also provide a default implementation of the<br />
javax.resource.spi.ConnectionManager interface for cases in which the Resource<br />
Adapter is used in a non-managed two-tier application scenario. A default<br />
implementation of ConnectionManager enables the Resource Adapter to provide services<br />
specific to itself. These services can include connection pooling, error logging and<br />
268 BES Developer’s Guide