ds.setJndiName("java:DefaultDS1");
ds.setMaxSize(100);
ds.setMinSize(10);
ds.setPassword("password1".toCharArray());
ds.setUsername("username1");
SecMetaData smd1 = new SecMetaData();
smd1.setDomain("java:/jaas/domain1");
ds.setSecurityMetaData(smd1);
XADataSourceMetaData xads = new XADataSourceMetaData();
xads.setJndiName("java:DefaultXADS2");
ds.setMaxSize(100);
ds.setMinSize(10);
ds.setPassword("password2".toCharArray());
ds.setUsername("username2");
xads.setXaDataSourceClass("org.jboss.xa.SomeXADS");
xads.setXaResourceTimeout(300);
SecMetaData smd2 = new SecMetaData();
smd2.setDomain("java:/jaas/domain2");
xads.setSecurityMetaData(smd2);
ArrayList<ConnMetaData> deployments = new ArrayList<ConnMetaData>();
deployments.add(ds);
deployments.add(xads);