|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.metadata.RepositoryPersistor
This class is responsible for reading and writing DescriptorRepository objects from and to persistent media. Currently only XML file based persistence is supported.
Constructor Summary | |
RepositoryPersistor()
|
Method Summary | |
void |
configure(Configuration pConfig)
configure an object using the Configuration pConfig |
protected DescriptorRepository |
deserialize(java.io.File serFile)
|
ConnectionRepository |
readConnectionRepository(java.io.InputStream inst)
Read the repository configuration file and extract connection handling information. |
ConnectionRepository |
readConnectionRepository(java.lang.String filename)
Read the repository configuration file and extract connection handling information. |
DescriptorRepository |
readDescriptorRepository(java.io.InputStream inst)
|
DescriptorRepository |
readDescriptorRepository(java.lang.String filename)
Read the repository configuration file. |
protected void |
serialize(DescriptorRepository repository,
java.io.File file)
|
void |
writeToFile(DescriptorRepository repository,
ConnectionRepository conRepository,
java.io.OutputStream out)
Write the DescriptorRepository to the given output object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RepositoryPersistor()
Method Detail |
public void configure(Configuration pConfig) throws ConfigurationException
Configurable
configure
in interface Configurable
pConfig
- the Configuration object used to configure current instance
ConfigurationException
public void writeToFile(DescriptorRepository repository, ConnectionRepository conRepository, java.io.OutputStream out)
DescriptorRepository
to the given output object.
public DescriptorRepository readDescriptorRepository(java.lang.String filename) throws java.net.MalformedURLException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
useSerializedRepository
is true
all subsequent calls read a serialized version of the repository.
The directory where the serialized repository is stored can be specified
with the serializedRepositoryPath
entry in OJB.properties.
Once a serialized repository is found changes to repository.xml will be
ignored. To force consideration of these changes the serialized repository
must be deleted manually.
java.net.MalformedURLException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public DescriptorRepository readDescriptorRepository(java.io.InputStream inst) throws java.net.MalformedURLException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
java.net.MalformedURLException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public ConnectionRepository readConnectionRepository(java.lang.String filename) throws java.net.MalformedURLException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
java.net.MalformedURLException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public ConnectionRepository readConnectionRepository(java.io.InputStream inst) throws java.net.MalformedURLException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
java.net.MalformedURLException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
protected DescriptorRepository deserialize(java.io.File serFile)
protected void serialize(DescriptorRepository repository, java.io.File file)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |