Vijay Govind

Greenhorn
+ Follow
since Oct 18, 2006
Merit badge: grant badges
For More
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 Vijay Govind

GM.

Please suggest on the below.

i) I plan to take SCWCD exam shortly and have moderate exposure to servlets. Which would be a good source of information that covers all the exam topics? (I have HFSJ March 2006 edition)

ii) Is there a threat of this version of the spec. becoming obsolete in near future(like EJB 2 vs EJB 3)?

Thanks a lot
Vijay.
Stress Testing...Myself...definitely no....I did handle it with care....
17 years ago
Yes. agreed. Initially misunderstood the question. You can bypass security on a method by method basis.

--Vijay
I have answered only 4 question wrong.

2 from EJB Overview(I think the language was weird and tricky), 1 from EJB-QL(this was tough), 1 from entity CMP interface and was tough as well. The areas that I felt tougher are EJB Roles/EJB Environment/EJB QL. The rest of the questions were straight forward and I felt the real exam way easier than any of the mock exams I have taken(including the one from HFEJB).

Thanks
Vijay.
17 years ago
Folks

Today I cleared SCBCD, with 94%. Thanks ranchers for all your support and thanks a lot to Mr. Bates and Ms. Kathy for their wonderful HFEJB book and many thanks to the folks from ejbCertificate.com & jDiscuss.com & java.boot.by.

Few things I would like to share with the group and excuse me if this is not the right place for the same.

1) Excellant book, no doubt, but if care is taken to fix all the mistakes in the book would make it #1.
2) The Indian edition of this book has substandard quality, pages come out from the book, can partially erase the printed content with a normal eraser and these two definitely are not features. I am seeing this happening in two of the indian edition books I bought. Can somebody do something to that?
3) On a light note, will Mr. Bates consider changing the models? I am little tired of seeing the same models.

I prepared a Last Minues tips doc, from various sources, which I would be happy to share with you all. Let me know if any of you are in need of it.

Thanks again
Vijay
17 years ago
Hmmm...That might be it....Thanks a lot.
Thanks Ajay. But I dont think your answers are related to my question and I my question is about restricting and not about allowing.
The tag <uncheked/> overrides all the other settings. I don't think you will be able to do that...Please post the answer if could find a way out...
Folks

From a message driven bean, I make a call to a session bean. The caller of the MDB as you know is the container and in the called session bean if I make a call to the method like getCallerPrincipal() on the Session bean's context what will be the result? How can I access restrict such a call from MDB as container propably wont fit into any of the roles.

Thanks and please relieve me of this confusion.
Vijay.
Yes Mate. Perfect. congrads....
17 years ago
Hello

Thanks again. This question is not about "accessing" a resource manager, but "just getting" a reference to the resource manager, which is just nothing but accessing your JNDI environment. Accessing bean's environment is allowed in setEntityContext. I completely agree that you cannot use the connection you got from a DataSource, to execute a query in setEntityContext and I believe the question is not about that.

I think I am missing something and please clarify...

Thanks a ton
Vijay.
Barathi

Tks for the response. "Accessing a resource like database" is different from "getting a reference to a resource like database". In setEntityContext, you can get a reference to the resource, which is this question about, but in setEntityContext you cannot use that reference to access the database. In page 197, it is clerly explained that getting a reference is different from accessing the resource using the reference. I am sorry for not conveying clearly what I was thinking, but the above was my intent. So, now suggest, if #4 is right or wrong.

Thanks
vijay
Folks

Why is #4 not right? I think you can get a "reference" to Resource Manager in setEntityContext (You can even get a "reference" to a connection) and agree that you might not be able to use it.

Please suggest. Turn to page 196 in HFEJB if need be...

Thanks...

===========================================================================
Which of the following are valid operations in the setEntityContext method, after the CMP entity bean has been instatantiated?

incorrect, you chose answers 1, 3, 4. The correct answers are 1,3.

1) Get a reference to your home interface.
2) Get a reference to your EJBObject.
3) Get a reference to your JNDI environment.
4) Get a reference to the resource manager.
5) Get security related information about the calling client application.

Answers 1 and 3 are correct.

An entity bean instance's life starts when the container creates the instance using newInstance(). The container then invokes the setEntityContext() method to pass the instance a reference to the EntityContext interface. The EntityContext interface allows the instance to invoke services provided by the container and to obtain the information about the caller of a client-invoked method.

At this moment the only valid operations within the setEntityContext() method are:

getting a reference to your home with getEJBHome() or getEJBLocalHome().
having access to your JNDI environment. It is not possible to get a reference to your EJBObject or to get security information about the client at this moment. If the entity bean tries to access methods that are not allowed then the container will throw an IllegalStateException.
===========================================================================
Folks

GM. Below is a question/detailed answer from ejbcertificate.com. My confusion is on answer #1. Why is #1 right? Is it not true that the compiler will provide the default constructor(in the absense of Bean Provider not providing the same) and why the Bean provider "must" provide the same? I looked at the example code given in HFEJB and that too does not provide a constructor. Please suggest...

Thanks...

=========================================================================
Which of the following methods must the entity bean provider implement in the abstract entity bean class?

Incorrect, you chose answer 4. The correct answers are 1,4.

1) The entity bean provider must provide a public constructor without arguments.
2) The entity bean provider must provide at least one implementation for the ejbCreate() method. 3) The entity bean provider must provide the implementation of the ejbFind() method(s). 4) The entity bean provider must provide the implementation of the ejbHome() method(s). 5) The entity bean provider must provide at least one ejbSelect() method.

Answers 1 and 4 are correct.

Answer 2 is incorrect, there are zero or more ejbCreate() methods, whose signatures match the signatures of the create() methods of the entity bean's home interface.

Answer 3 is incorrect, the bean provider of an entity bean with container-managed persistence does not write the finder methods. The finder methods are generated at the entity bean deployment time using the Container Provider's tools.

Answer 5 is incorrect, the Bean Provider may provide zero or more select methods. A select method is a query method that is not directly exposed to the client in the home or component interface. The bean provider typically calls a select method within a business method. The bean provider defines the select methods as abstract methods.
=========================================================================
Thanks first of all. I somehow was thinking that it is not Bean Provider's responsibility to define a default constructor. I was not thinking about the bean class as such.(i.e after it was compiled & by when it should have got this default constructor).

Thanks anyway.