Package org.apache.geronimo.xbeans.persistence20

Examples of org.apache.geronimo.xbeans.persistence20.PersistenceDocument


                if (endPos >= 0) {
                    //path relative to ear base uri
                    String relative = persistenceLocation.substring(pos + rootBase.length(), endPos);
                    //find path relative to module base uri
                    relative = module.getRelativePath(relative);
                    PersistenceDocument persistenceDocument;
                    try {
                        XmlObject xmlObject = XmlBeansUtil.parse(persistenceUrl, new BundleClassLoader(moduleContext.getDeploymentBundle()));
                        persistenceDocument = convertToPersistenceDocument(xmlObject);
                    } catch (XmlException e) {
                        throw new DeploymentException("Could not parse persistence.xml file: " + persistenceUrl, e);
                    }
                    PersistenceDocument.Persistence persistence = persistenceDocument.getPersistence();
                    buildPersistenceUnits(persistence, overrides, module, relative);
                    knownPersistenceUrls.add(persistenceUrl);
                } else {
                    throw new DeploymentException("Could not find persistence.xml file: " + persistenceUrl);
                }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xbeans.persistence20.PersistenceDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.