Narayan R

+ Follow
since Jul 11, 2005
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Narayan R

Please see any session bean class code, it says
public class abcxyz implements SessionBean {
.................. }

So as per Java rule the compiler will see if this class have implemented all methods from SessionBean inteface( I.e SetSessionContext,ejbPassivate,ejbActivate,ejbRemove) Only . It won't care (atleast for compling) about interface methods or component inteface methods.

Those things will be neede only when the class is been deployed in the container..

Think about this// how's the compiler supposed to know that this class should have getAdvice(), Do_not_getadvice(), give_only_goodAdvice()...etc method ?? if we have not implemented the Home/component inteface in the bean class..

FYI .. and we never ever say that the class implements home/component interface .. its all supposed to be understood by Container by looking at ejb-jar.xml file.

Hope this help..
Thanks Kathy, Bert for a one awfully great book & Liesbeth(from JavaBlackbelt) and all ranchers for helping throughout.

18 years ago
The question was in the mocks by jPilotExam web site.
The question says:

Which method can be called "without exception", by both remote and local clients on a reference to a session bean's component interface?


and it says correct answer is E(ie Remove) , I think a remove method can always throw RemoveException ( weather local or Remote doesn't matter). I think correct answer should be getEJBHome(D) as the component stub was created from Home so we can always have eJBHome W/o Exception.. Any thoughts?? Please let me know if I'm wrong..
About question 7, The container may create a bunch of beans and keep it in pool cven before the client call
When setEntityContext is been called the continer have no idea which Primarykey object the instance will get assigned to (later) . So it cannot call getEJBObject.
for question 8 refer to the lifecycle diagram on page 324. its preety clear
which chapter/page #, you are taking about?
I think the solution should include option A. EJB Specs 15.8.2
Pg 325 says "The container provider must support the deployment of a message-driven bean as the consumer of a JMS queue or a durable subscription."
Please tell if my interpretation is wrong.
it will take about 8 hrs to complete the java project. JSP and ejb, But you will get preeety much idea of J2ee project.
Its an excellant resource to see all(most) that goes in J2EE project. you may even see Struts.
The sun site hangs when I click for exam objectives. Its been like this since thursday..
if you have it please post it here.
HFEJB is the best but as alternative you may want go through the EJB 2.0 spec, they are easy to understand altough not as fun as HF book
The home.create() method tell container to make the instance. See the concrete implimentation of home interface, it have a command like container.preInvoke(this, ...), so the Contianer still bosses the EJBObject instance.