This object provides an implementation of a persistent MRU (Most Recently Used) list of datasource value objects. It uses class atg.cim.persistence.RecentDatasourceList.

The following example persists a datasource value object:

atg.cim.worker.datasource.DatasourceValue dsVal = new DatasourceValue();
dsVal.setAlias("mydatasource");
dsVal.setDatabaseName("dbName");
dsVal.setDatabaseType(Constants.CIM_DB_TYPE_ORACLE);
dsVal.setDriverPathsAsString("/path/to/OracleDriver");
dsVal.setHostname("localHost");
dsVal.setJndiName("jndiName");
dsVal.setPassword("password");
dsVal.setPort("1234");
dsVal.setUsername("username");
dsVal.setUrl("/url/to/db");
SessionContext.getRecentDatasourceList().addAliasToList(dsVal.getAlias(), dsVal);

This code retrieves the newest five datasource value objects in a List:

mRecentDatasourceList = new RecentDatasourceList(); // or use nucleus
  resolve
ListDatasourceValue list =
  mRecentDatasourceList.getList("datasourceAlist",5);

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices