You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Feng Qiang <fq...@silicomp.com.sg> on 2006/08/01 03:37:33 UTC

OJB hang

Hello everyone,

I am using ojb 1.0.4 in weblogic 8.1.5 on HP unix, I use ojb to retrieve 
data from a database view. However, when record is few, the retrieve is 
OK. But if the record is bigger, ojb will hang. My retrieval is like 
this:
ReportQueryByCriteria query =
        QueryFactory.newReportQuery(ShipmentViewImpl.class, crit);
Iterator iter = broker.getReportQueryIteratorByQuery(query);

The query will hang at the getReportQueryIteratorByQuery() statement.

Anyone can give me any suggestion to solve this problem.

Best Regards
Feng Qiang 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: OJB hang

Posted by Edson Carlos Ericksson Richter <ed...@mgrinformatica.com.br>.
Unique case I've found OJB hang is because of unfinalized transactions 
(so it's a database problem, not OJB ones).
I had situations where I query tables with almost 1 milion records, 
without problem (I've used MaxDB, on linux and windows, MsSQL, on 
windows and Oracle 10g on linux and windows).

Of course, you should check:

1) There are pending transactions on your database
2) What is your database strategy for queries (read uncommited, read 
commited, etc)
3) If there are sufficient memory allocated to Virtual Machine 
(parameter -Xmx1024m by example, that alocates 1GB for program 
execution. Default for VM is 64M)

Could you share what database you uses, what amount of memory and how 
large is table you are using?

May be you should use a pagination strategy (so you don't load every 
record from database - only his PKs, then load records as needed, in 
demand).

Regards,

Richter


Feng Qiang escreveu:
> Hello everyone,
>
> I am using ojb 1.0.4 in weblogic 8.1.5 on HP unix, I use ojb to retrieve 
> data from a database view. However, when record is few, the retrieve is 
> OK. But if the record is bigger, ojb will hang. My retrieval is like 
> this:
> ReportQueryByCriteria query =
>         QueryFactory.newReportQuery(ShipmentViewImpl.class, crit);
> Iterator iter = broker.getReportQueryIteratorByQuery(query);
>
> The query will hang at the getReportQueryIteratorByQuery() statement.
>
> Anyone can give me any suggestion to solve this problem.
>
> Best Regards
> Feng Qiang 
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
>
>