[JBoss-user] [Persistence & CMP/JBoss] - Re: Lock and immediate rollback of a transaction

2004-08-05 Thread invisiblemage
>>But in this case I must lock the "user/pk" table instead of >>"my data" table: where is the difference ? You do the following: (Server Code) try { locktable.findByUserLock(user,row_to_lock); return false; } catch (FinderException e) { insert(user,row_to_lock); // can only be inserted of

[JBoss-user] [Persistence & CMP/JBoss] - Re: Lock and immediate rollback of a transaction

2004-08-04 Thread invisiblemage
So, are we talking of "real" clients, that read some data, display it to the user, and after 20 minutes the user commits new data? Then it is really no good practice to keep the entity-reference on the client (with a transaction open ?!!) - the client should never ever have direct access to an e

[JBoss-user] [Persistence & CMP/JBoss] - Re: Container Managed Relationships query

2004-08-04 Thread invisiblemage
how do you think the java code to access this field would look like? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844077#3844077 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844077

[JBoss-user] [Persistence & CMP/JBoss] - Re: Lock and immediate rollback of a transaction

2004-08-04 Thread invisiblemage
just wondering why you would like that behaviour ??? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844073#3844073 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844073

[JBoss-user] [Persistence & CMP/JBoss] - Re: is entity exists

2004-08-04 Thread invisiblemage
Collection findAllByXXX(Integer xxx) throws FinderException; if (c.size() > 0) { entity exists... } else { ...not } Or in EJB 2.1 use COUNT in a ejbSelect if you will not need the entity after checking. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopi