Sorry i'm posting this to both lists, but i don't know if it's a JBoss
or a Castor related problem.

I use Castor for implementing BMP in entity beans. When accessing the
entity beans from a client, no problems occur. Accessing the entity
beans through session beans leads to a deadlock.

After doing some testing the problem only occurs, if ejbCreate and
ejbStore are called in the same transaction. The bean hangs at
db.update(data).

Does anybody know, how to solve this problem?

Thank you,
Ralf

snipped from entity bean implementation:

    public void ejbStore() {
                try {
                Database db = CastorHelper.getDatabase();
                        db.update(data);
                        db.close();
                } catch(Exception e) {
                        e.printStackTrace();
                        throw new EJBException(e);
        }
        dirty = false;
    }


    public Long ejbCreate() {
        data = new FreeTimeData();
        try {
                Database db = CastorHelper.getDatabase();
                db.create(data);
                db.close();
        } catch(Exception e) {
                e.printStackTrace();
                throw new EJBException(e);
        }
                freeTimeID = data.getId();
                dirty = false;
        return freeTimeID;
    }


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to