/** * Set the JDBC Connection Descriptor alias of the PersistenceBroker * configuration to use. Default is the default connection configured for OJB. */ public void setJcdAlias(String jcdAlias) { this.pbKey = new PBKey(jcdAlias); }
/** * Set the JDBC Connection Descriptor alias of the PersistenceBroker * configuration to use. Default is the default connection configured for OJB. */ public void setJcdAlias(String jcdAlias) { this.pbKey = new PBKey(jcdAlias); }
/** * Set the JDBC Connection Descriptor alias of the PersistenceBroker * configuration to use. Default is the default connection configured for OJB. */ public void setJcdAlias(String jcdAlias) { this.pbKey = new PBKey(jcdAlias); }
/** * Set the JDBC Connection Descriptor alias of the PersistenceBroker * configuration to use. Default is the default connection configured for OJB. */ public void setJcdAlias(String jcdAlias) { this.pbKey = new PBKey(jcdAlias); }
/** * Set the JDBC Connection Descriptor alias of the PersistenceBroker * configuration to use. Default is the default connection configured for OJB. */ public void setJcdAlias(String jcdAlias) { this.pbKey = new PBKey(jcdAlias); }
/** * Set the JDBC Connection Descriptor alias of the PersistenceBroker * configuration to use. Default is the default connection configured for OJB. */ public void setJcdAlias(String jcdAlias) { this.pbKey = new PBKey(jcdAlias); }
/** * This method initializes the persistence broker framework. The dbalias is selected in the * following fashion: * 1. by using the argument passed to the constructor of the query handler * 2. by using the configuration variable in the ols-config.properties file * 3. by using the default connection alias (if defined. if not defined, an exception * will be thrown) * @param alias - the db alias to use */ private void initializeBroker(final String alias) throws PersistenceException { try { if (alias != null) { broker = PersistenceBrokerFactory.createPersistenceBroker(new PBKey(alias)); logger.debug("Broker initialized to " + alias); } else { //use configured one by default String configAlias = ConfigurationManager.OLS_DBALIAS; if (configAlias != null) { broker = PersistenceBrokerFactory.createPersistenceBroker(new PBKey(configAlias)); logger.debug("Broker initialized to " + configAlias + "."); } else { broker = PersistenceBrokerFactory.defaultPersistenceBroker(); logger.debug("Broker initialized to default PB."); } } } catch (PBFactoryException pbf) { throw new PersistenceException("Could not initialize PB: " + pbf.getMessage(), pbf); } }
JdbcConnectionDescriptor jcd = cr.getDescriptor(new PBKey(jcdAlias)); if (jcd == null)
private Long nextAvailableSequenceNumber(String sequenceName, Class clazz) { ModuleService moduleService = getKualiModuleService().getResponsibleModuleService(clazz); if ( moduleService == null ) throw new ConfigurationException("moduleService is null"); ModuleConfiguration moduleConfig = moduleService.getModuleConfiguration(); if ( moduleConfig == null ) throw new ConfigurationException("moduleConfiguration is null"); String dataSourceName = moduleConfig.getDataSourceName(); if (StringUtils.isEmpty(dataSourceName)) { return nextAvailableSequenceNumber(sequenceName); } else { PBKey key = new PBKey(dataSourceName); PersistenceBroker broker = OjbFactoryUtils.getPersistenceBroker(key, false); if (broker != null) { return getDbPlatform().getNextValSQL(sequenceName, broker); } else { throw new ConfigurationException("PersistenceBroker is null"); } } }
JdbcConnectionDescriptor jcd = cr.getDescriptor(new PBKey(jcdAlias)); if (jcd == null)