lds.setPrefill(true);
lds.setPreparedStatementCacheSize(50);
lds.setQueryTimeout(30000);
lds.setUserName("user");
// Set a SecurityMetaData to validate its MO
SecurityMetaData smd = new SecurityMetaData();
smd.setDomain("java:/jaas/SomeDomain");
lds.setSecurityMetaData(smd);
ManagedConnectionFactoryDeploymentMetaData[] mds = {lds};
mcfs.setDeployments(Arrays.asList(mds));
mcfs.setUrl(new URL("file:/deploy/some-ds.xml"));