private void fillConnection(Application application, Vector properties) {
Connection connection = new Connection();
connection.setId(UIDGenerator.generateId());
for (Iterator it = properties.iterator(); it.hasNext();) {
Property property = (Property) it.next();
if (Context.PROVIDER_URL.equals(property.getKey())) {
connection.setUrl(getValue(property.getVal(), application
.getVariables()));
} else if (Context.SECURITY_PRINCIPAL.equals(property.getKey())) {
connection.setUser(getValue(property.getVal(), application
.getVariables()));
} else if (Context.SECURITY_CREDENTIALS.equals(property.getKey())) {
connection.setPass(getValue(property.getVal(), application
.getVariables()));
} else if ("jndi.connection.pool.minPoolSize".equals(property
.getKey())) {
connection.setMinPoolSize(getValue(property.getVal(),
application.getVariables()));
} else if ("jndi.connection.pool.maxPoolSize".equals(property
.getKey())) {
connection.setMaxPoolSize(getValue(property.getVal(),
application.getVariables()));
} else if ("jndi.connection.pool.timeout".equals(property.getKey())) {
connection.setTimeoutPool(getValue(property.getVal(),
application.getVariables()));
} else if ("jndi.connection.name".equals(property.getKey())) {
connection.setName(getValue(property.getVal(), application
.getVariables()));
}
}
application.setConnection(connection);
application.setConnectionName(connection.getName());