I am using xdoclet 1.2b. The attribute 'use-soft-locking' of ejb.bean tag says: "If true, then generate a public int version attribute in the auto-generated concrete class, to form a optimistic locking mechanism. The value of version attribute is incremented in ejbStore. The default is false. Note: It's applicable to both CMP and BMP, but many containers have optimistic locking capabilities built-in, so you don't need to worry about it locking issues.". I was wondering if jboss supports built-in optimistic locking, and if it does, what exception it throws when optimistic locking is encoutered? I've used xdoclet's value object pattern but it is of no use because during a single transaction ejbStore is called many times making version attribute useless since it is incremented in the ejbStore.