atg.service.jdbc.MonitoredDataSource vs atg.nucleus.JNDIReference

Monitored DataSource

This is the default class used by ATG for configuring datasources,Most of the out of the box repositories in ATG uses  this in combination with JTDataSource component.

JNDIReference

For working with Weblogic Server,you need to override the old style of relying MonitoredDataSource,it makes life difficult if we have multiple repositories pointing to multipe datasources,configuring each repositories in this way is a tedious task,
instead replace the old class with atg.nucleus.JNDIReference,so now the repositories  is pointing to the datasource which is specified by the JNDIName in the  JTDataSource component,which in turn points to the  Datasources configured in Weblogic Server identified with the JNDI name.

eg:

$class=atg.nucleus.JNDIReference
JNDIName=abc_ds

where abc_ds is the JNDI name in which you have configured the datasource in Weblogic Server.

See how to alter a datasource quickly/easy -> Alter Datasource Quickly

2 comments:

Anton said...

If you accessing remote JNDI resource how do you specify the address in JNDIReference? Is there any way?

Sebastian said...

you can specify it in the same way,your local copy of application server have the option to configure the remote hostname,port and database.

Other way is to override this configuration using FakeXADataSource component.

Post a Comment

Related Posts Plugin for WordPress, Blogger...