* {@inheritDoc}
*/
@Override
public Connection getConnection(String profileId) {
ApplicationContext ctx = profileInstanceManagers.get(profileId);
DerbyPooledDataSource dataSource = (DerbyPooledDataSource) ctx
.getBean(DATA_SOURCE_BEAN_NAME);
try {
return dataSource.getConnection();
} catch (SQLException e) {
throw new ProfileException(e.getMessage(), e);
}
}