Parvathi G

Greenhorn
+ Follow
since Dec 17, 2005
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 Parvathi G

Hi,

For the Stateless bean same home represents same bean pool.
As the session beans are from the same bean pool they are identical.
But the EJBObject will be the new object for each Sateless bean rite.

isIdentical method is used to determine if 2 object references (remote or local) refer to the same session bean EJBObject/EJBLocalObject.

Please clarify this.

Thanks & Regards,
Parvathi.
Hi,

For session bean the ejbCreate() mtd is called only once rite.
So, for stateless bean it is called before the instance go to pool.
Then for statefull session bean is it every time bcoz the bean is specify to the client.

Please correct if I am wrong.

Thanks & Regards,
Parvathi.
Hi,

The isIdentical() mtd is used to find
1. Whether the two remote reference are same or not - Session bean
2. Whether two PK's are same or not - Entity bean.

For Stateless the mtd returns True if both references came form the same home. Same home means, from the same client. But there will be only Home.
The Home object differs from client to client ?

For Statefull Session beans, the method returns always false.
Bcoz every client has its own bean and EJBObject. So for Statefull session bean it is as per the EJBObject and bean.
For Stateless bean is from the pool but the EJBObject is a new instatnce
rite.....

So confusing...........





























Hi,
I am having confusion in ejbCreate() method call for a Stateless bean.
Container will create a pool of Stateless Session Beans(the setSessionContext() mtd call is decided by the Container).
When client calls the Home create() mtd, the Container returns the EJBObject but at this time, the bean is still in the pool, there is no link between the EJBObject and Bean. The bean is associate to EJBObject only when the client invokes any business mtd on the EJBObject.
So, when will be ejbCreate() mtd in the Bean is executed. Is it when the Container creates the bean or else when the client invokes the Home.create().

Entity Beans also pooled by the Continer. So, for this ejbCreate() is called when the client invokes Home.create() method.

Please clarify me on this....

Thanks & Regards,
Parvathi.
Hi,

So, the remove method in both home and remote interfaces calls the bean.ejbRemove() method to destroy the reference of the bean.
Then which remove() mtd we have to choose, home.remove() or remote.remove()()( apart of statless bean and local clients).

Thanks & Regards,
Parvathi.
Hi,

There are total 4 remove methods.

1. Home.remove(Handle h)
2. Home.remove(Object PK)

3. EJBObject.remove()

4. Bean.ejbRemove()

As the client is exposed to Home and Component interface, he can call either of the first three remove methods.
I am not clear on the difference between the remove() methods given in the Home and Component interface.
What is actually removed when we call the remove method from the home and component interface.

These are my understanding,

1.When Home.remove() mtds are called, it is not that home is removed.
It is to tell the container that a particular bean is done with the home.
To identify a particular bean we have to pass either Handle(session/entity bean) or PK objects (entity bean).

2. When EJBObject.remove() mtd is called then it is to tell the container to remove the bean references.

We have the remove methods in Home and the Component bcoz the LocalClients doesn't have any handles,
so for them EJBObject.remove() is useful.

Now my question is,

What the container will do with the Home.remove() and EJBObject.remove().
Is the bean destroyed or the bean reference is destroyed.

When will bel the ejbRemove() from the bean is called?
As ejbRemvoe() is a container callback method, will it be called when ever the client
call the Home.remove() and EJBObject.remove() methods or any timeout occured ?

If ejbRemove() is called will bean destroyed or the bean references are destroyed.

Please clarify me on these points.


Thanks & Regards,
Parvathi.
Hi..
Thanks for the Correction.
It is the Bean name what actually we refere through the JNDI.
And that reference is giving the home stub.
I actually made a conclusion depending on the diagaram.
Thanks a lot

Regards,
Parvathi.
Hi,
Please have look on the Head First EJB book from page number 91 (Chapter 2).


Thanks & Regards,
Parvathi.
Hi,
When we register the home reference in the JNDI, it is the stub reference not the home object reference. Is it like, if we are refereing to any remote object reference in JNDI then we need to do a narrow casting instead of normal casting. Please correct if I am wrong any where.


Thanks & Regards,
Parvathi.
Hi,
When I am going through EJB 2.0 specs, it is specified that when we are using Remote interface the the argument are passed by value ( Copy of the object), this is fine. But when we are using the Local interface then it is pass-by-reference.
Is it mean that a copy of the reference is passed, which we call as pass-by-value. Bcoz there is no pass-by-reference in Java ( It is only a copy of the reference value).
Please correct me if I am wrong

Thanks & Regards,
Parvathi.
Hi,
Can one please clarify on why we will go for narrow casting for home stub. Is it like with narrow casting will get the stub that implements the interface ( home interface). Please clarify me with one example.

Thanks & Regards,
Parvathi.
Hi,
I want to go for Oracle Certification, which includes SQL and PL/SQL.
Can anyone please guide me in this.
What is the prescribed book and any studies available please let me know.

Thanks in advance.

Cheers,
Parvathi
15 years ago
Thanks for the information
Version means, will it be EJB 2.1 or EJB 3.0