JBoss.org Community Documentation
Entity beans can be marked as read-only. When a bean is marked as read-only, it never takes part in a transaction. This means that it is never transactionally locked. Using commit-option D with this option is sometimes very useful when your read-only bean's data is sometimes updated by an external source.
To mark a bean as read-only, use the read-only
flag in the jboss.xml
deployment descriptor.
<jboss> <enterprise-beans> <entity> <ejb-name>MyEntityBean</ejb-name> <jndi-name>MyEntityHomeRemote</jndi-name> <read-only>True</read-only> </entity> </enterprise-beans> </jboss>
Example 11.11. Marking an entity bean read-only using jboss.xml