org.apache.jetspeed.components.rdbms.ojb
Class DatabasePlatformConfigurator

java.lang.Object
  extended by org.apache.jetspeed.components.rdbms.ojb.DatabasePlatformConfigurator

public class DatabasePlatformConfigurator
extends Object

Dynamically configures Database Platform for OJB by looking at the connection string and figuring out the OJB platform using an OJB metadata utility Its important to get this right otherwise you will be sending the wrong (most likely HSQL) flavor of SQL statements to the backend database.

Version:
$Id: $
Author:
David Sean Taylor

Field Summary
private  DataSource ds
           
private  String jcdAlias
           
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
DatabasePlatformConfigurator(DataSource ds, String jndiName)
           
 
Method Summary
 void init()
           
private  String updateOraclePlatform(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor jcd, DataSource ds, String platform)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

ds

private DataSource ds

jcdAlias

private String jcdAlias
Constructor Detail

DatabasePlatformConfigurator

public DatabasePlatformConfigurator(DataSource ds,
                                    String jndiName)
Method Detail

init

public void init()
          throws Exception
Throws:
Exception

updateOraclePlatform

private String updateOraclePlatform(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor jcd,
                                    DataSource ds,
                                    String platform)
                             throws org.apache.ojb.broker.accesslayer.LookupException,
                                    IllegalAccessException,
                                    InstantiationException,
                                    SQLException
Parameters:
jcd -
Throws:
org.apache.ojb.broker.accesslayer.LookupException
IllegalAccessException
InstantiationException - throws SQLException
SQLException


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.