-
1. Re: JBoss AS 7 Support for XDoclet tag @jboss.method-attributes needed
wdfink Jan 5, 2013 8:38 AM (in response to erscan)Hi Ersin,
If you load a collection via CMR the method call of 'Collection get....' and the iteration must be in the same transaction. This is in AS4.3 and AS5, maybe in 4.0 it was different
the jboss.xml is replaced by jboss-ejb3.xml which is a different structure, you may have a look into the {jboss}/docs/schema for this.
Also in AS7 there are several issues with EJB2 and CMP configuration and behavior. Several people are working on that. I hope that we can provide commits in AS7.1 and AS7.2 branch.
-
2. Re: JBoss AS 7 Support for XDoclet tag @jboss.method-attributes needed
erscan Jan 5, 2013 10:30 AM (in response to wdfink)Hi Wolf-Dieter,
thank you very much for the quick response.
Up to now, I couldn't find a way to configure calls to the getter methods of a CMP Entity Bean (EJB2.1) read-only.
I have looked into the schemas for jboss-ejb3.xml and ejb-jar.xml and couldn't find any support for my problem.
In JBoss AS 4/5/6 we had the jboss.xml.
We don't want to run a load-anything-method with a CMR call in a EJB transaction, because it's just a read, without a write/update operation.
I think, there should not be a need for a transaction in this szenario (performance issues).
So, we need something like
<entity>
...
<method-attributes>
<method>
<method-name>get*</method-name>
<read-only>true</read-only>
</method>
</method-attributes>
</entity>
Otherwise, we get the following exception, when we access the CMR collection.
"A CMR collection may only be used within the transaction in which it was created".
Any idea ?
Ersin