Hi,
I am new to OJB. I am shifting form Castor-JDO.  I have the following
question regarding initializing OJB.

I would like to use the PersistenceBrokerAPI. I see that, irrespective
of API that we use (PersistenceBroker, JDO, ODMG), we need to initialize
OJB using a repository.xml and OJB.properties.

1) Can we auto load repository.xml?
2) Can I pass repository.xml as an InputStream or a DOM instead of
String to PersistenceBrokerFactory.createPersistenceBroker() via PBKey
of course. I see that createPersistenceBroker(String repository) is
deprecated.

So far.. after looking at the code, I am unable to figure out the a way
to pass in object version of repository.xml.

The reason I would want to do this is that, I can wrap OJB and create it
as a separate module, which other modules that need persistence can use.
I do not have to change the Persistence module to include repository.xml
every time a new module that wants to use Persistence is included. I
would like to pass in object form of the repository.xml during startup
time, which Persistence Module would consume and know who to store the
objects.


I appreciate your help
Thanks
Suresh

Reply via email to