Hi,
I have just started preparing for SCBCD.I am currently going through the
EJB spec.
In the spec in the following paragraph i have a doubt (page 66)
" All session objects of the same stateless session bean within the same home have the same object identity,which is assigned by the container."
Here in the above statement i have the following doubts.
1. I am i right to say that "All session objects" means "All EJB Objects" ?If what i have understood is right then according to Head First each client gets his own EJBObject and his own bean.
So it means that if there is client A, then that client A will get EJBObject A and a bean A and for client B an EJBObjectB and a bean B.
so when we use isIdentical() method for checking whether two EJB Object is refering to the same bean it should result false always.But in the spec i found the following line which confuses me.
"The following example illustrates the use of the isIdentical method for a stateless session object.
FooHome fooHome = ...; // obtain home of a stateless session bean
Foo foo1 = fooHome.create();
Foo foo2 = fooHome.create();
if (foo1.isIdentical(foo1)) {// this
test returns true
...
}
if (foo1.isIdentical(foo2)) {// this test returns true
...
}"
My question is how in the second if statement the test returns true ?
If i have understood wrongly , pls correct me.