The original code above should be right one then. Look in 8.1 branch otherwise. Also note there is bug JBoss AS JCA connection factory creation if added it once and deleted and added with same name again.
as per the above exception, you need to make sure "teiid-connector-file.rar" has been deployed. You can a call "admin.getDataSourceTemplateNames" to make sure.
Ramesh..