{
obj = new InitialContext().lookup(name);
}
catch (NamingException e)
{
throw new ConnectionFactoryNotFoundException(name, e);
}
if (!(obj instanceof DataSource) && !(obj instanceof XADataSource))
{
throw new UnsupportedConnectionFactoryException(obj);