O'Reilly logo

WebLogic: The Definitive Guide by Avinash Chugh, Jon Mountjoy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required