you shouldn't do this. You should store the brokerfactory away and then get a new 
broker from the pool when you need it.
 
m

        -----Original Message----- 
        From: Marino Tudor [mailto:[EMAIL PROTECTED]] 
        Sent: Wed 10/16/2002 8:02 AM 
        To: Ojb-User 
        Cc: 
        Subject: RE: Database instance not found in multithreaded environments?
        
        


        Thanks Armin,
        
        I was using ver. 0.95.
        It works with ver. 0.97 I downloaded today.
        
        Is it posible to put the broker in the same way in ServletContext and
        use it for all sessions later on?
        
        Somethning like:
        
         PBKey pbKey = new PBKey("repository.xml");
         PersistenceBroker broker =
        PersistenceBrokerFactory.createPersistenceBroker(pbKey);
         context.setAttribute(IConstants.OJB_BROKER, broker);
        
        Regards
        Marino
        
        
        --
        To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
        For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
        
        

<<winmail.dat>>

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


Reply via email to