* @see org.apache.ojb.broker.accesslayer.ConnectionFactory#lookupConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor)
*/
public Connection lookupConnection(final JdbcConnectionDescriptor conDesc)
throws LookupException {
if (ConnectionFactoryImpl.manager == null) {
throw new LookupException("ConnectionFactoryImpl is not initialized! Please check your cocoon.xconf");
}
try {
return ((DataSourceComponent) ConnectionFactoryImpl.datasources.select(conDesc.getJcdAlias())).getConnection();
} catch (final ServiceException e) {
throw new LookupException("Cannot lookup DataSource " +
conDesc.getJcdAlias(), e);
} catch (final SQLException e) {
throw new LookupException("Cannot get connection from DataSource " +
conDesc.getJcdAlias(), e);
}
}