Hi Don,

OJB does nothing special if you are running it in a managed environment.
So IMO the overhead you see must be J2EE overhead.

I expect that you will see a drastic improvement if you just use a
(stateless) SessionBean and not BMP entity beans.
EntityBeans require *a lot* of management overhead.
Proper usage of transaction demarcation with entity beans also has an
enourmous impact!
So in OJB.properties you should switch to container managed connections!

cheers,
Thomas

> -----Original Message-----
> From: Don Walling [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 11, 2003 11:58 PM
> To: OJB Users List
> Subject: Re: speed question
> 
> 
> Its the average time. The first time takes close to 2 seconds.
> I'm not so worried about the absolute value of the time. Its the 
> relative difference when we put the code inside an EJB that is 
> bothersome. Just wondering if there is something we're 
> missing regarding 
> configuration, or if we can reasonably expect the timings to 
> be similar.
> Thanks for your help,
> Don
> ---
> 
> [EMAIL PROTECTED] wrote:
> 
> >Is 450ms the average time it takes or is it the first time 
> the ejb container 
> >takes a request?
> >
> >Jeff
> >
> >
> >On Tuesday 11 March 2003 09:44 am, you wrote:
> >  
> >
> >>We're experiencing a speed difference we can't explain. 
> We've tried the
> >>following code in two circumstances:
> >>
> >>Date start = new Date();
> >>PersistenceManager manager = factory.getPersistenceManager();
> >>PersistenceBrokerFactory.defaultPersistenceBroker().clearCache();
> >>manager.currentTransaction().begin();
> >>String filter = "registrationNumber == 2";
> >>Query query = manager.newQuery(AircraftValue.class,filter);
> >>Collection all = (Collection)query.execute();
> >>Interator result = all.iterator();
> >>Date end = new Date();
> >>
> >>When packaged in a .war and invoked by a .jsp, the code executes in
> >>about 15 ms. When packaged in an ejbLoad() method on a BMP, it takes
> >>about 450 ms. The OJB.properties and registry.xml files are 
> identical in
> >>both cases (copied from OJB 0.9.9), and we're using a 
> datasource to SQL
> >>Server. Is this speed difference resulting from being 
> executed inside a
> >>BMP transaction? Or is something else going on?
> >>Thanks in advance,
> >>Don
> >>---
> >>
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>    
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >  
> >
> 
> -- 
> Your favorite stores, helpful shopping tools and great gift ideas. 
> Experience the convenience of buying online with [EMAIL PROTECTED] 
> http://shopnow.netscape.com/
> 
> 


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

Reply via email to