/ Documentum,ECM,TOOLS DCTM Documentum : DataSource Configuration (DS)

Documentum : DataSource Configuration (DS)


Juste a mini-post concerning the configuation of DATASOURCE on Documentum server.
The DATASOURCE (DS) are configurable:

Here, the example for the DS “java:/MY_ARCHIVE_DS” :

<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:1.2">
       <subsystem xmlns="urn:jboss:domain:datasources:1.0">


                <datasource jndi-name="java:/MY_ARCHIVE_DS" pool-name="MY_ARCHIVE_DS" enabled="true" use-java-context="true">
                        <exception-sorter class-name="org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter"/>
                    <driver name="h2" module="com.h2database.h2">
                    <driver name="oracle.jdbc" module="oracle.jdbc">
                    <driver name="sqljdbc" module="">



    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">


The use of this DS in the JOB/JAVA code could be:

	private static final String DS = "MY_ARCHIVE_DS";
	private static final String JNDI_PREFIX[] = { "java:/", "java:", "jdbc/" };

		InitialContext ic = new InitialContext();
		for (int i = 0; i < JNDI_PREFIX.length && dataSource == null; i++) {
			try {
				dataSource = (DataSource) ic.lookup(JNDI_PREFIX[i] + DS);
			} catch (NamingException e) {
		if (dataSource == null) {
			throw new Exception("Unable to find datasource " + DS);

	Connection connection = dataSource.getConnection();
	try {

		PreparedStatement statement = connection.prepareStatement(MessageFormat.format(sql.toString(), StringUtils.upperCase(StringUtils.trimToEmpty(table)), year.format(coll.getTime("time_stamp").getDate())));

		//... Save the original data in a BLOB field in ARCHIVE database
		Blob blob = connection.createBlob();





	} finally {

			if (commit) {
				println("SqlConnection transaction commited !");
			} else {
				println("SqlConnection transaction rollbacked !");

That’s all!!!


Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

Related Post

Documentum : BOF – SBO (Service based Business Object) – NoSuchMethodException – JAVA reflectionDocumentum : BOF – SBO (Service based Business Object) – NoSuchMethodException – JAVA reflection

Hello, After my previous post, just a mini post related an error java.lang.NoSuchMethodException which occurs when the use of a SBO’s method whereas it exists. Basically in JAVA, the