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

Natarajan Shankar

Ranch Hand
+ Follow
since Jun 10, 2004
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 Natarajan Shankar

Hello All,
In the HFEJB - 429. Qtn - 15.

Option 2 says the Identification vaiable can represent a single variable or a collection
-- It is corerct right, since we can use it like
WHERE m.title='some title' and
WHERE d.movies IS EMPTY.

Pls. Clarify my understanding is wrong or not.
Hello all,
Would you pls. explain below things. This is from HFEEJB -196.

1. When we have an EJBHome why we cannnot access information about the

2. When we can access transaction in BMT/ CMT. Any rules or any reference
need for it.

3. Access:
Special JNDI environment - What is this JNDI environment ?

You split class files and have things organized.

Normal Java Files and supporting File - JAR
JAR+WEB Componenets (JSP/HTML/SErvlet)- WAR

WEB-INF this directory will contain Web information. Will contain
web.xml file
Hi Christina,
Thanks a lot for your explanation, I was looking for any specific reason for not able to access the method. From your explanation i understood thre might some more extra features need to be added from by container providers.

Thanks for sharing your knowledge.
Hello all,
I need clarification regardiong setSessioncontext. I don't understand if in

1. setSessionContext if we can get a reference to EJBHome why not get security information about the client?

2. If we can have special JNDI access like datasource and by uising it If I get ds.getConnection, why I cannot able to use the connection. Does it stops me to do con.createStament() and executng query.

If you have any clarification things pls. help me out. Thanks !
Even EJB spec doesn't recommend to create instance variable in the statless bean. So it must depends on input parameter.
No this is one of basic dobut most of people will have. This code also work fine. But run() is not actual threading, it is normal method call in the program. The correct way is calling t.start() in main() method, at that point only you will leave to processor to work on your thread.
Hello Prashant,
Since normal Java architecture is not scatter for different OS. But you mgiht ask then how it is platform in-dependant, Of-course while installing you will take different version of Java for Win / Unix, right? So you might got ht point. But EJB Architecture is for distributes which can work even component in different platforem using RMI-IIOP protocol.
Yes, I was also having same assumption. But I was wondering my assumption is correct or not. For this reason only I was looking into some documents and also in my earlier question I meant as primitive array. Thanks for the support.
Ok Valentin, thanks for the reference so you mean primitives are not serializable?
Dear all,
During ejbPassivate() said it can take serializable object for passivation without any alteration. How about primitives/ arrays? They are serializable auto?
Hi Amitava Basu,
Thanks for your clarificatio.

when R passes a reference of A to anybody it is actually passing the copy of the stub.
And that is OK.

The above clarification you have given was the point I was missing in my understanding, when R passes a reference of A I was assuming the actual object reference. Thanks for you clarification. BTW, this solution will satisfy if we're assuiming this one.
Hi Sundar,
You can refer SCWCD material by Hanumanth Deshmukh

Doing certification will help you to get understand things better. Of-course it will help you to get better place, I mean if your working as developer and if your looking for a change in Solution Architect then better understanding is alawys better. So in-that way it will be useful.
Givn Remote client 'R' that has valid reference to session bean 'A' and 'B', and given that 'A' is local client to 'B', which statement are true. (Choose all that apply)

A. R Cannot passs his reference for A, to B.

B. A Cannot pass his reference for B, to R.

C. A Cannot invoke method of B.

D. B cannot invoke method on R.

{Correct answer give was B and D.}

Can you pls. explain why A is not valid and B is valid.
My assumption is R is in one heap and Sesson bean A,B are in another heap. So R will not pass reference it can pass only reference copy.
For CLOB/ BLOB data-type you need to open stream of the data-typoes and write the information through the stream. As I known, direct casting is not possible through API level.