----- Original Message ----- From: "casterx" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 29, 2002 10:28 PM Subject: PBKey, repositoryFile & broker.store() in a servlet environment bug
> In order to prevent hardcoded values in my EAR file, I create a new PBKey > and create the first broker instance in an autostarting servlet, after that, > I store the PBKey in my application context. > > When I try to create a new broker in a different servlet, I get the key and > create the instance. However, for some reason, whenever I call > broker.store(), OJB tries to load the repository from the OJB.properties > file. Think this should work. But keep in mind, you must declare a repository file in OJB.properties. This repository is used as a 'default' repository, say better it's the main repository. This repository have to know about all persistent objects. So if you store an object, OJB using for internal operations the default repository, a default PB (e.g. sequence generation). Maybe the given PB (created with your PBKey) and the default PB point to the same DB (single DB), maybe not (multiple Databases). The default PB was returned with PBF.defaultPersistenceBroker(). HTH, Armin > > Is there any reason why it would book for the repository file on a store() > after it's successfully created? > > > Thanks > Caster > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
