myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dean <>
Subject Re: [Trinidad] client (or server?) JS timeout on inputListOfValues only when running hibernate query
Date Wed, 08 Oct 2008 16:56:59 GMT
Hi, Changing the bean from (scope="request") to (scope="singleton" or scope="session") resolves
the problem below.  I'm guessing the Trinidad pop-ups do not qualify as being from the same
request scope, thereby causing the Dao class to timeout going to Postgres and hang the HTTP
connection.  I thought hibernate would automatically re-connect in those situations, but I
guess not.  I just read most spring beans should be scoped singleton anyways, that is the
default.  I posted this just in case anyone else runs into this problem.  Thank you.

Animated Designs

----- Original Message ----
From: dean <>
Sent: Tuesday, October 7, 2008 6:57:27 PM
Subject: [Trinidad] client (or server?) JS timeout on inputListOfValues only when running
hibernate query

Hi, I am running into a reproducible inputListOfValues timeout problem.  My configuration
is Vista, Java 1.5, Spring 2.5, Tomcat 6.0.18, Trinidad 1.2.9, Hibernate 3.4, Postgres 8.
 I mirrored the approach used in the sample project.  The strange thing, is that it works
fine when I  hardcode the values for the list.  But when I use a hibernate call to populate
the list, the dialog appears to timeout after 3-4 successful iterations (clicking on the flashlight).
 The last dialog will appear to timeout going to the server.  I know the hibernate service
is returning the sql results correctly because I am able to view the results in the pop-up
table.  I don't think the problem is my configuration because I integrated the periodicTable
demo directly into the same page (even right into the same table/column) and it runs without
any problems.  The hibernate service is being injected using the spring constructor method.
 I don't get any visible JS errors in
 Firebug.  The browser window time's out "Waiting for localhost...".  Firebug shows 0 requests.
 Since the hibernate query runs in the constructor, I don't see any reason why the hibernate
query (less than 100 rows) would contribute to the dialog timing out.  It behaves the same
with/without Facelets.  Thank you.

Animated Designs


           <tr:inputListOfValues label="test"
                                  searchDesc="select from a list"
                                  columns="16" action="dialog:kmaOptionCodeTableProxy"
                                  windowWidth="500"  />    

  <bean id="kmaOptionCodeTableProxy" class="com.anides.cms.admin.faces.beans.proxy.KmaOptionCodeTableProxy"
        <constructor-arg index="0" ref="kmaService"/>        

public KmaOptionCodeTableProxy(KmaService kmaService) {
        this.optionCodeLoL=new ArrayList<List<String>>();
// List values hardcoded with no problems
        List<String> ls=new ArrayList<String>(2);
// This works for the first 3-4 pop-ups, than subsequent dialogs open but do not render (browser
tries to connect)
        OptionCodeDao optionCodeDao=this.kmaService.getOptionCodeDao();     //hibernate call
        List<OptionCodePE> optionCodePEList=optionCodeDao.findAll();        
        for (int i=0;i<optionCodePEList.size();i++) {
            List<String> ls=new ArrayList<String>(2);        
            if (!optionCodePEList.get(i).getIs_package()) {


View raw message