WebLogic-Specific Configuration Options

The weblogic-ra.xml descriptor file allows you to specify additional configurations for the resource adapter that are specific to the WebLogic platform. For instance, you must use the weblogic-ra.xml descriptor to specify a logical name for the connection factory associated with the J2EE connector, and the JNDI name to which the ConnectionFactory object will be bound:

<weblogic-connection-factory-dd>

  <connection-factory-name>XADsWithTx</connection-factory-name>
  <jndi-name>myapp.XADsWithTx</jndi-name>
  ...

If the resource adapter includes any native libraries needed for establishing a connection to the EIS, you can use the native-libdir element to specify the location of the folder where the native libraries will be copied. Sun’s XADataSource connector doesn’t require any native libraries, and therefore we can ignore this setting. The weblogic-ra.xml descriptor also holds values for configurable properties defined earlier in the standard ra.xml descriptor file. You need to define a map-config-property element for each property whose default value needs to be overridden. The following XML fragment shows the values we’ve chosen when using Sun’s XADataSource resource adapter to wrap access to Microsoft’s JDBC Driver for SQL Server 2000:

  ...
  <map-config-property>
    <map-config-property-name>ConnectionURL</map-config-property-name> <map-config-property-value> jdbc:microsoft:sqlserver:// </map-config-property-value> </map-config-property> <map-config-property> ...

Get WebLogic: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.