I've been using it in a servlet environment for some time. You need to
retrieve a PesistenceBroker from the poool that exists already and use it do
your operations and close it. Just make sure you close it when you are done.

Example:

 try{

     PersistenceBroker broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
     broker.close();

 } catch (PersistenceBrokerException  ex) {
       logger.error(ex.getMessage(), ex.fillInStackTrace());
 } catch (PBFactoryException  ex) {
       logger.error(ex.getMessage(), ex.fillInStackTrace());
 }

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


> -----Original Message-----
> From: Roland Carlsson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 3:05 AM
> To: OJB Users List
> Subject: PersistensBroker in servlets
>
>
> Hi!
> How do one use OJB in a servlets?  The example I finds is only an
> application and I doesn't find any information concurrency in
> OJB. Is the PersistensBroker synchronized properly to be used
> strait ahead or do I have to build a broker-pool
>
> I'm sorry if I missed anything in the documentation
>
> Thanks in advance
> Roland Carlsson


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to