1 22 package org.jboss.deployment; 23 24 import java.net.URL ; 25 26 import org.jboss.xb.binding.ObjectModelFactory; 27 import org.jboss.xb.binding.Unmarshaller; 28 import org.jboss.xb.binding.UnmarshallerFactory; 29 30 37 public abstract class ObjectModelFactorySimpleSubDeployerSupport extends SimpleSubDeployerSupport 38 { 39 44 public abstract ObjectModelFactory getObjectModelFactory(); 45 46 protected void parseMetaData(DeploymentInfo di, URL url) throws DeploymentException 47 { 48 try 49 { 50 Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller(); 51 ObjectModelFactory factory = getObjectModelFactory(); 52 Object root = null; 53 di.metaData = unmarshaller.unmarshal(url.toString(), factory, root); 54 } 55 catch (Throwable t) 56 { 57 DeploymentException.rethrowAsDeploymentException("Error parsing meta data " + url, t); 58 } 59 } 60 } 61 | Popular Tags |