This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!

marco ves

Greenhorn
+ Follow
since May 23, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by marco ves

RE:

Can you verify. I think the correct answer should be A. Even a local home you retrieve from JNDI.


The key here is they say "Application Client" This means outside the local JVM that the application server is running in so there for you can't use a LocalHome reference.
So the answer is B

Will appreciate if you start a Long Post for 287 also.


One is already started
http://www.coderanch.com/t/144259/po/certification/IBM-ICE-TEST
I would assume that you didn't get it. Everybody already got their's. Sorry.
Congratulations,
Was 287 anything like the ice exam?
Here is the question.
While testing a BMP entity bean, a developer discovers that a transaction rollback does not cause a rollback of the changes made to the bean as it should. Which of the following should the developer suspect?
A.The ejbPassivate() method has a bug.
B.The ejbStore() method has a bug.
C.The ejbCreate() method has a bug.
D.The datastore does not support JTA.
E.The transaction does not implement javax.transaction.UserTransaction.
Select 2 answers.
I think that the answer must be D and E because the rollback for entity beans is handled by the container and is out of the programmers hands. So, there is no point in checking ejbPassivate() ejbStore() method , ejbCreate() for bugs.
Does anyone have any input?
I believe that you are correct. Thank you for the reply.
This question is hard. Can anyone help?
The following sequence of method calls occurred on a CMP entity bean instance when a session bean invoked the CMP's businessMethod1() and businessMethod2() methods from the same session bean method entityBean.ejbActivate() entityBean.ejbLoad() entityBean.businessMethod1() entityBean.businessMethod2() entityBean.ejbStore() entityBean.ejbPassivate() Assuming that the session bean is configured with 'Required', what MUST be TRUE about the scenario that generated these method calls?
A.The business methods are NOT configured with 'RequiresNew'
B.Any persistent state changes that occur as a result of businessMethod1() are in the same transaction scope as changes made by businessMethod2().
C.Any persistent state changes that occur as a result of businessMethod1() are in a different transaction scope than changes made by businessMethod2().
D.ejbStore() will write the resultant state of the entity bean to the persistent store.
Select 2 answers.
Is the answer B and D ?
I think that the answer to question 52 is B and D.
Here is the reasoning.
This restriction can be solved by following the principles outlined here:
It is mandatory to modify the ejbCreate and ejbPostCreate methods to
include the Account as a parameter so that the relationship can be
established using the setTheAccount method.
EJB 2.0 has the restriction that CMR fields cannot be manipulated in the
ejbCreate method.
Setting of the related Account must therefore happen in the ejbPostCreate
method. This is possible because WebSphere Version 5 issues the actual
database INSERT after the ejbPostCreate method (and not after the
ejbCreate method).
AND
Promotes the getter and setter methods to the local component interfaces.
The EJB developer should carefully check whether the invocations of a setter
does not occur database problems in the case of non nullable foreign keys. In
this case the setter method should be manually deleted from the interface.
[ May 30, 2003: Message edited by: mark sev ]
The answer to question 6 has to be B and C. Because all documentation says the setRollbackOnly() can only be called on CMT.
Although not required, application beans should explicitly make the decision
to cause a rollback and not leave it to the container. They can do this by
calling the EJBContext.setRollbackOnly method. Remember, application
exceptions result in a commit unless you explicitly call the setRollbackOnly
method.
Note that setRollbackOnly is only available for container-managed
transactions; bean-managed transactions must use the rollback method of
the UserTransaction object.
I got this from http://java.sun.com/dtd/web-app_2_3.dtd:
The ejb-ref element is used for the declaration of a reference to
an enterprise bean's home. The declaration consists of:
- an optional description
- the EJB reference name used in the code of
the web application that's referencing the enterprise bean
- the expected type of the referenced enterprise bean
- the expected home and remote interfaces of the referenced
enterprise bean
- optional ejb-link information, used to specify the referenced
enterprise bean
Used in: web-app
So I am at a loss.
Question number 1: What is a dds file?
I think that this is the only file that can not have a ejb reference.
for question 12 is the answer B? This would make sense. I could also see someone saying C because the data is small. Definitely not D because stateful session bean is not necessary. Browsers might not support cookies so not answer A.
B is the best answer.