protected final void merge(InputStream is) throws RepositoryConfigurationException
{
try
{
IBindingFactory factory;
try
{
factory = SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<IBindingFactory>()
{
public IBindingFactory run() throws Exception
{
return BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
}
});
}
catch (PrivilegedActionException pae)
{
Throwable cause = pae.getCause();
if (cause instanceof JiBXException)
{
throw (JiBXException)cause;
}
else if (cause instanceof RuntimeException)
{
throw (RuntimeException)cause;
}
else
{
throw new RuntimeException(cause);
}
}
IUnmarshallingContext uctx = factory.createUnmarshallingContext();
RepositoryServiceConfiguration conf = (RepositoryServiceConfiguration)uctx.unmarshalDocument(is, null);
if (defaultRepositoryName == null)
{
this.defaultRepositoryName = conf.getDefaultRepositoryName();