Apologies if this has nothing to do with jBoss.  I've searched and searched
and can't find out what my problem is.  I've asked the Castor mailing list
for help but so far have not received any.

I've plugged Castor 0.9 into jBoss 2.1 (CVS 2/26/01) and have used the
design pattern of the downloadable Castor example app rooms.zip.

I'm using PostgreSQL 7.1 beta 4 and here's my problem:  I have a JDOHelper
class similar to the example's CastorHelper that works well on create,
update, and remove, and findByPrimaryKey but hangs after iterating the
QueryResults on finding a Collection.  Below is the pertinent info and I
can't figure out if it's Castor or jBoss.  Thanks for helping.

>From the jBoss console:

[CastorJDO] Loading com.pfi.sys.SystemCodeTypeData (1)
[SystemCodeTypeManager] Got here 1
[CastorJDO] Loading com.pfi.sys.SystemCodeTypeData (2)
[SystemCodeTypeManager] Got here 1
[CastorJDO] Loading com.pfi.sys.SystemCodeTypeData (3)
[SystemCodeTypeManager] Got here 1
[SystemCodeTypeManager] Transaction XidImpl [FormatId=257,
GlobalId=jmarkham//2, BranchQual=] timed out. status=STATUS_ACTIVE

>From my client:

            Collection c = sctm.findAllSystemCodeTypes();
            Iterator i = c.iterator();
            while(i.hasNext())
            {
                SystemCodeTypeData sctd = (SystemCodeTypeData)i.next();
                System.out.println(sctd.getId() + " " +
sctd.getDescription());
            }

>From my stateless session EJB:

    public Collection findAllSystemCodeTypes() throws
DatabaseNotFoundException, PersistenceException
    {
        return dao.findAllSystemCodeTypes();
    }

>From my DAO class:

    public Collection findAllSystemCodeTypes() throws
DatabaseNotFoundException, PersistenceException
    {
        String query = "SELECT t FROM com.pfi.sys.SystemCodeTypeData t";
        return helper.findCollection(query);
    }

>From my helper class:

public Collection findCollection(String query) throws
DatabaseNotFoundException, PersistenceException
    {
        Database db;
        OQLQuery oqlQuery;
        QueryResults results;
        Collection data = new ArrayList();

        db = jdo.getDatabase();
        oqlQuery = db.getOQLQuery(query);
        results = oqlQuery.execute();

        while(results.hasMore())
        {
            data.add(results.next());
            System.out.println("Got here 1");
        }
        System.out.println("Got here 2");    // <---- never gets to this
point
        db.close();

        return data;
    }




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]

Reply via email to