Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Ganeshji Marwaha

Greenhorn
+ Follow
since Sep 16, 2004
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 Ganeshji Marwaha

yes, JSP 2.0 is reqd.

But, if u want to use the struts tag library with EL , u can use Struts-EL. This will work for struts tags only though.

Originally posted by Chengwei Lee:


As of EJB 2.0, entity beans must must be CMP. There's no doubt/choice/alternative/question about it. You cannot make it a BMP. This is something you need to be clear of.



I am not particularly sure about this Lee...

I would say that as of EJB 2.0, entity beans *must* be a CMT. Even if the bean is either of CMP or BMP, it still has to use CMT.

Ofcourse, to use CMRs we still have no choice other than using CMPs.

But still, my point is that BMPs are still allowed.

Originally posted by -Sanju Thomas-:
Hi all,

Today I took HF-EJB mock exam and I scored 82% in it. Am I ready to attend the real exam ?. I ask this question here because I did not attend any other mock exam except ejbcertifcate.com, and I don't have enough time to read more too. I took almost 70 minutes to complete the exam. And I think I gone wrong in atleast four to five questions only because they are not providing the number of currect answers. Please give your comments.



wow! That sounds like a >=90 score in real exam... Go ahead and best of luck... Keep us posted on the result.
I agree with Jose... There will be a deploy-time error, i guess, if you dont put in a body-content tag
The dispatcher element in the <filter> is introduced only as a part of Servlet 2.4 spec. So, i would assume that is the problem. You may be interested to try using some container which offers servlet 2.4 features...

Originally posted by Jose Esteban:


Sorry Bassam, but I don't agree. According to Servlet spec 2.4, SRV.13.4:
"1. web-app Element
...
All sub elements under this element can be in an arbitrary order."

So the order doesn't matter under <web-app>



I agree with u Jose... I guess, this order thing has been made lenient starting from servlet spec 2.4. so, we can have elements within in any arbitary order... unless, u know that the order matters to u... like in the case of ordering of filter DD elements...
a quick hack would be to use response.sendRedirect in ur servlet to get to the JSP page so that page 3 is treated as it should be... I am assuming that the servlet forwards the request to page 3 using requestdispatcher...
15 years ago
JSP

Originally posted by Serghei Jelauc:
Hi ranchers.
Cant understand one thing about subj.
HFEJB, page 406: "YOU CAN'T USE DOT NOTATION TO RETURN A CMR FIELD."
If director is cmr-field then m.director IS NOT OK.

HFEJB, page 435, question 13: "What's true about EJB QL path expression?"
One of the correct answers - B says: Path expression can terminate with either cmr-field or cmp-field.

What is true?

Thanks in advance.




In EJB-QL u can return 2 types of data
1. OBJECT(M)
2. M.xxx

when u use OBJECT(M), the Component Interface is returned. When u use M.xxx, the field of the Bean is returned.

Ur first Statement says that u cant use M.address if address is a CMR field
Ur Second Statement says that u can use Object(M.address) if address is a CMR field.

Hope this clarifies...!!!
from my exp. most of the times, it works great... coz, most of the container vendors today are very good at handling subtle issues like these... But the point is, that the spec does not mandate the container to handle writing of static fields... So, u might be writing components that arent portable...

Originally posted by Suresh Ramamurthy:
Thanks Ganesh for that Reply. What I could interpret from your reply is,
there is no harm in doing Steps 2-5 in EJB Object if any container developer wishes to.



That is correct...

I sometimes find it very satisfying when i can visualize how the container vendor might have implemented it... Typically we dont care how the container provider implements it, but if it aids our understanding, then we definitely do care... dont we???

Originally posted by arunij katiliyar:
Thanks Ganesh for the clarification .I am preparing for scbcd by reading mastering ejb and java boot camp by MZ . Is this enough .

Thanks
Arun



Mastering EJB is a great book... But, we aware, that the 3rd edition is for EJB 2.1 and there are quite a few new features in that... but that exam is only for EJB 2.0

From other ranchers, i am under the understanding that MZ notes are pretty useful... But, i would suggest u to have a glance at the spec also when u need deeper clarification.

BTW, sorry for the late reply...
i can think of 2 possible replies to this question

1. The responsibility lies with the Home object. Think about it... We are asking a Home object to create a Session bean for us. So, it should be the responsibility of the Home object to create an instance of *whatever* and return that to us..

2. The OID diagrams are for our understanding. A developer is supposed to think that it works that way.. Who knows how weblogic has implemented it or JBoss has implemented it...

Hope this answer helps...
You might try posting some code, so that we can try and figure out if there is any issue.
I will try to attempt this question.

The container is the one who provides the servlet with reference to request and response objects it creates. so, obviously the container will have a reference to the response object, until the response is completely written to the client. Then both request and response may be GC-ed.
absolutely... u nailed it...

if entity bean participates in relationhips only using local interfaces. Remote interfaces are not allowed... In fact, the primary goal of introducing local interfaces into the ejb 2.0 spec was for CMRs only. Only later the spec team decided to make it applicable for all beans...