[jboss-jira] [JBoss JIRA] (EJBTHREE-2283) Please correct to return it to the receiver without changing the object type as it is when the Collection interface is used by the finder method of EJB2.1.
栗原 政彦 (JIRA)
jira-events at lists.jboss.org
Tue May 15 05:11:17 EDT 2012
栗原 政彦 created EJBTHREE-2283:
-------------------------------
Summary: Please correct to return it to the receiver without changing the object type as it is when the Collection interface is used by the finder method of EJB2.1.
Key: EJBTHREE-2283
URL: https://issues.jboss.org/browse/EJBTHREE-2283
Project: EJB 3.0
Issue Type: Feature Request
Components: ejb3_1
Affects Versions: EJB3_1 1.0.1
Environment: Red Hat Enterprise Linux Server release 5.5 Beta (Tikanga)
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Server VM (build 22.0-b10, mixed mode)
Reporter: 栗原 政彦
Phenomenon
==========
We are shifting the EJB application made by the specification of EJB2.1 from WebLogic to JBossAS7.1.
Then, the problem occurs.
The value is set in ArrayList with EntityBean, and it returns it to Collection of SessionBean.
However, the problem returned in order of the row that is not the order of the set in ArrayList when returning to SessionBean occurs.
SessionBean of the receiver hopes to receive it without changing the arrangement of the set with EntityBean.
In JBoss, the class that can handle it by the Collection interface
(
For Example ,
List ( ArrayList / LinkedList / Vector ),
Set ( HashSet / TreeSet ) and
Map ( HashMap / TreeMap )
)
is put again in HashSet.
And the returned value is returned when called by the finder method of EntityBean.
Is this a specification?
When we proceed with the investigation from StackTrace, processing that put the object again in HashSet was done in [EntityBeanHomeFinderInterceptorFactory.java] .
The class that can handle it by the Collection interface seems to be putting it in HashSet for the Collection interface.
Reference
=========
Enterprise JavaBeansTM Specification and Version 2.1 specifications
http://download.oracle.com/otn-pub/jcp/ejb-2.1-fr-spec-oth-JSpec/ejb-2_1-fr-spec.pdf
Chapter of "12.1.8.2 Multi-Object Finders"
The Bean Provider can choose two types to define a collection type for a finder:
the Java(TM) 2 java.util.Collection interface
the JDK(TM) 1.1 java.util.Enumeration interface
A Bean Provider targeting containers and clients based on Java 2 should use the java.util.Collection
interface for the finder's result type.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list