public void configure (final Map mapGlobalSettings, final String strComponentName, final Map mapComponentSettings) { this.log.trace("TokenGeneratorHandler::initialize"); String tableName = (String) mapComponentSettings.get("AssocTableName"); JdbcServerAssociationStore privateAssociations = new JdbcServerAssociationStore(tableName); boolean status = true; try { InitialContext cxt = new InitialContext(); String dataSourceJndi = (String) mapComponentSettings.get("AssocDataSource"); DataSource ds = (DataSource) cxt.lookup(dataSourceJndi); privateAssociations.setDataSource(ds); } catch (NamingException e) { log.error("Unable to load JNDI data source from context."); status = false; } _privateAssociations = privateAssociations; java.net.URI opEndpointUri = (java.net.URI) mapComponentSettings.get("OPEndpoint"); _opEndpoint = opEndpointUri != null ? opEndpointUri.toString() : null; _expireIn = (Integer) mapComponentSettings.get("AssocExpiry"); this.bConfigured = status; }
public void configure (final Map mapGlobalSettings, final String strComponentName, final Map mapComponentSettings) { this.log.trace("TokenGeneratorHandler::initialize"); String tableName = (String) mapComponentSettings.get("AssocTableName"); JdbcServerAssociationStore privateAssociations = new JdbcServerAssociationStore(tableName); boolean status = true; try { InitialContext cxt = new InitialContext(); String dataSourceJndi = (String) mapComponentSettings.get("AssocDataSource"); DataSource ds = (DataSource) cxt.lookup(dataSourceJndi); privateAssociations.setDataSource(ds); } catch (NamingException e) { log.error("Unable to load JNDI data source from context."); status = false; } _privateAssociations = privateAssociations; java.net.URI opEndpointUri = (java.net.URI) mapComponentSettings.get("OPEndpoint"); _opEndpoint = opEndpointUri != null ? opEndpointUri.toString() : null; _expireIn = (Integer) mapComponentSettings.get("AssocExpiry"); this.bConfigured = status; }