after the creation of domain.xml , unjar the bundled samples.jar.
PEFileLayout layout = new PEFileLayout(cfg);
File appsDir = layout.getInstallApplicationsDir();
File domainDir = layout.getRepositoryDir();
File jarFile = new File(appsDir, "samples.jar" );
try{
ZipFile file = new ZipFile(FileUtils.safeGetCanonicalPath(jarFile),
FileUtils.safeGetCanonicalPath(domainDir));
file.explode();
}catch(ZipFileException e){
throw new DomainException( strMgr.getString("samplesDomainNotCreated") ,e );
}