[jboss-dev-forums] [JBoss AS 7 Development] - JBoss AS 7 Support for XDoclet tag @jboss.method-attributes needed
Ersin Canli
do-not-reply at jboss.com
Fri Jan 4 12:15:40 EST 2013
Ersin Canli [https://community.jboss.org/people/erscan] created the discussion
"JBoss AS 7 Support for XDoclet tag @jboss.method-attributes needed"
To view the discussion, visit: https://community.jboss.org/message/787667#787667
--------------------------------------------------------------
Hello,
we are migrating from JBoss AS 4.0.5 to JBoss AS 7.1.3.
We have a CMP Entity Bean (EJB 2.1) with a 1:n/n:1 relation (java.util.Set<ObjectXYZ>).
When we load the Entity outside of a transaction (for example by calling homeInterface.findByPrimaryKey(4711) and want to iterate over the relation "java.util.Set..." for example from a struts action we get the following Exception in JBoss AS 7.
"A CMR collection may only be used within the transaction in which it was created".
The Entity ist configured via XDoclet annotations/tags.
So we have the tag @jboss.method-attributes pattern = "get*" read-only = "true", which results to
<entity>
<ejb-name>....</ejb-name>
<configuration-name>CMP 2.x and Cache</configuration-name>
<method-attributes>
<method>
<method-name>get*</method-name>
<read-only>true</read-only>
</method>
</method-attributes>
</entity>
in jboss.xml.
In JBoss 7 AS the jboss.xml is not supported.
1. Question: How can I tell the getter-methods of my entity to be read-only in JBoss AS 7 ? Otherwise I will get the above Exception with the relation !
2. Querstion: How is it possible to deploy/configure/run a CMP Entity Bean (EJB 2.1) with a CMR without a transaction in JBoss AS 7.
Thanks.
Ersin.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/787667#787667]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130104/cf40236b/attachment.html
More information about the jboss-dev-forums
mailing list