Set Data Source & DB Adapter Instance Connection

on

Env : weblogic 11g

I. Data Source

Weblogic Console > Left Menu > Source > Data Source > New
Things to consider :

  • Setup is it XA
  • URL better to use the TNS format
  • Tune your init/min/max connection after you create it

II. DB Adapter Instance Connection

Weblogic Console > Deployment > DBAdapter > Configuration > Outbound Connection Pool > New
Things to consider :

  • I prefer to edit directly on Plan.xml (you can look the path where is the plan.xml on tab overview)
  • if you’re using XA, you’ll need to set the XADataSourceName. If you’re not you need to set the DataSourceName
  • If it works normally, enter the empty row on XAdatasourcename/datasourcename then the input field will appear there, you can set the value, and ENTER. Save it. BUT, IF YOU ARE UNLUCKY, JUST EDIT IT MANUALLY

Setup Plan.xml Manually

What I notice is each instance database connection adapter is will generate two variable and two variable-assignment. At Least that 4 elements need to be created.

# Variable Part

<variable>
 <name>ConnectionInstance_eis/DB/website_JNDIName_xxx</name>
 <value>eis/DB/website_data_source</value>
</variable>
<variable>
 <name>ConfigProperty_dataSourceName_Value_yyy</name>
 <value>jndi.website_adapter_instance_name</value>
</variable>

# Variable Assignment Part

<variable-assignment>
 <name>ConnectionInstance_eis/DB/website_JNDIName_xxx</name>
 <xpath>/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="eis/DB/website_data_source"]/jndi-name</xpath><origin>planbased</origin>
</variable-assignment>

<variable-assignment>
 <name>ConfigProperty_dataSourceName_Value_yyy</name>
 <xpath>/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="eis/DB/website_data_source"]/connection-properties/properties/property/[name="dataSourceName"]/value</xpath>
</variable-assignment>

For Notes!

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s