Hi Ramesh, I tried the following 2 approaches.
Approach 1:
With jboss 7.1.1 and teiid 8.1 , I tried to add a file data source using the below code and it resulted in an exception which i mentioned in my earlier post, attached the log(jboss_711_Teiid_81.log).
Admin admin = AdminFactory.getInstance().createAdmin("localhost",9999,"admin","admin".toCharArray());
final Properties p = new Properties();
p.setProperty("class-name","org.teiid.resource.adapter.file.FileManagedConnectionFactory");
p.setProperty("pool-name", "marketdata-file");
p.setProperty("max-pool-size", "4");
p.setProperty("enabled", "true");
p.setProperty("use-java-context", "true");
p.setProperty("ParentDirectory", "../data/");
p.setProperty("AllowParentPaths", "true");
admin.createDataSource("java:/marketdata-file","teiid-connector-file.rar",p);
Approach 2:
With jboss-eap-6.1 and teiid 8.4,I tried to add a file data source using the below code and it resulted in an exception in my test case, attached the log (jboss_eap_61_Teiid_81.log)
Admin admin = AdminFactory.getInstance().createAdmin("localhost",9999,"admin","admin".toCharArray());
final Properties p = new Properties();
p.setProperty("class-name","org.teiid.resource.adapter.file.FileManagedConnectionFactory");
p.setProperty("pool-name", "marketdata-file");
p.setProperty("max-pool-size", "4");
p.setProperty("enabled", "true");
p.setProperty("use-java-context", "true");
p.setProperty("ParentDirectory", "../data/");
p.setProperty("AllowParentPaths", "true");
admin.createDataSource("java:/marketdata-file", "file", p);