Hi. Please see the list of my doubts and comment on it if possible
Test #2:
com.enthuware.ets.scbcd.v5.2.19 the default name in the description is incorrect (should use a / to separate the field from classname)
com.enthuware.ets.scbcd.v5.1.23 the en-entry-name element is invalid, missing the "Bean" suffix, and the default name given is invalid (the same as above)
com.enthuware.ets.scbcd.v5.2.278 option d) "it can be used to update entity beans" is misleading, I initially thought it asks about updating data in
EJB 2.1 CMP beans; some questions explicitly state that they ask about EJB 3.0 entities, some don't, which is inconsistent
com.enthuware.ets.scbcd.v5.2.128 option a) "select new Integer(avg(s.score)) from Student s" in invalid, and has this explanation: "Doing new Integer here is invalid syntax. Also, AVG function always returns Double." I think the things that are wrong are that it must be "select java.lang.Integer" and also that avg() returns a Double, whereas the explanation would imply that using "select new" is invalid
com.enthuware.ets.scbcd.v5.2.210 in the object to DnD, there are two NULL strings, and when you use the second one from the top, it works, but when the first one is used, the query is rated as incorrect, which is weird
com.enthuware.ets.scbcd.v5.2.329 option c) is a little misleading. it says "Path expressions that contain NULL values during evaluation return NULL values", however, only for terminal associations it behaves like this. in non-terminal associations (as it uses an inner join) such relationships are simply not taken into account when returning results, so they don't return null values at all
com.enthuware.ets.scbcd.v5.2.257 option c) "Ensuring that all the declared EJB references are bound to the homes of enterprise beans that exist in the operational environment." - does it really have to mention "homes"? as we know 3.0 don't need a home interface at all
com.enthuware.ets.scbcd.v5.2.96 option c) "Class files, persistence.xml file, and orm.xml" is said to be valid, with explanation: "orm.xml will always be examined because any mapping information given in orm.xml overrides the information present in the classes in the form of annotations.". This is only partially correct, as if the orm.xml file uses metadata-complete or the entity elements use xml-mapping-metadata-complete and are set to true, the annotations are not processed at all. Thus, the classes cannot be said to be processed always, option d) is valid
com.enthuware.ets.scbcd.v5.2.122 the code is invalid, according to JPA specs, section 2.1.7: "If there is an association between two entities, one of the following relationship modeling annotations must be applied to the corresponding persistent property or instance variable of the referencing entity: OneToOne, OneToMany, ManyToOne, ManyToMany.". The code does not specify any annotation , so it is wrong.
Test #3:
com.enthuware.ets.scbcd.v5.2.98 @OneToMany need a mappedBy attribute for a bidirectional association (Javadoc for this attribute dictates this), the question doesn't use it
com.enthuware.ets.scbcd.v5.2.54 The question is: "Identify the correct statements about a MDB client...", and the answer is that it cannot access the methods of the MDB, but there is no such thing as a MDB client - so even the answer is logically incorrect because the full sentence would say "A MDB client cannot access its methods" but there is no client, there can only be code that sends messages to the bean's destination
com.enthuware.ets.scbcd.v5.2.150 it says that the beans does not call setRollbackOnly(true), but there is no such method; also, the question doesn't say if the rollback attribute is set to true or false
com.enthuware.ets.scbcd.v5.2.106 a typo in @OneTOMany in option c) (should be @OneToMany)
com.enthuware.ets.scbcd.v5.2.283 the code for lookup is wrong - it has additional parameter that is the home type, and an erroneous closing bracket - this made me think a PortableRemoteObject.narrow() call was intended and missing, and I thought the client was remote
com.enthuware.ets.scbcd.v5.2.324 explanation for option d) is "There is no requirement on the getter and setter methods in terms of accessibility. It depends of the requirements of the application." but the question or option d) never mentions accessibility (it mentions abstract); when accessibility is considered the specs say (2.1.1, page 18, second bullet): " If the entity has property-based access (...) The property accessor methods must be public or protected.", so there actually is a requirement on that, but only for method-access, but the question should specify what access it is asking about, I think it could clarify
com.enthuware.ets.scbcd.v5.2.62 the last option should be changed to say it "must provide a public no-arg constructor", as public is a requirement
Cheers,
Raf