D
David
I am struggling to understand EJBs, basically I have got an EJB called
Stateless2 and the following source files...
Stateless2Bean.java (the actual EJB)
Stateless2.java (EJBObject)
Stateless2Home.java (EJBHome)
Stateless2Local.java (EJBLocalObject)
Stateless2LocalHome.java (EJBLocalHome)
....now I understand I can just do a JNDI lookup for the EJBHome
(ejb/Stateless2Home) and I get the (remote) home interface and then
call the create() to get the (remote) object interface (ie with the
business logic methods)
This all works fine, but if my understanding is correct then all calls
to these objects go to the network layer (even if the EJB and servlet
are in the same JVM) and so are relatively inefficient.
....thats where the (local) Home and (local) object interfaces comes
in, they work in the same way, but make local calls and so are more
efficient.
The problem is that I cant figure out how to call them! Do I just do a
JNDI lookup for it, if so then what is the reference?
I have lauched the Universal Test client (in WSAD) and can browse the
JNDI tree and see ejb/Stateless2Home etc, I can also so a section
called [local EJB Beans] which expands to ejb/Stateless2Home which if
a look into it this is actually the (local) Home, but I cant figure
out what the JNDI name is?
Any help grately appreciated.
David Bevan
http://www.davidbevan.co.uk
http://www.websphereusergroup.org.uk
Stateless2 and the following source files...
Stateless2Bean.java (the actual EJB)
Stateless2.java (EJBObject)
Stateless2Home.java (EJBHome)
Stateless2Local.java (EJBLocalObject)
Stateless2LocalHome.java (EJBLocalHome)
....now I understand I can just do a JNDI lookup for the EJBHome
(ejb/Stateless2Home) and I get the (remote) home interface and then
call the create() to get the (remote) object interface (ie with the
business logic methods)
This all works fine, but if my understanding is correct then all calls
to these objects go to the network layer (even if the EJB and servlet
are in the same JVM) and so are relatively inefficient.
....thats where the (local) Home and (local) object interfaces comes
in, they work in the same way, but make local calls and so are more
efficient.
The problem is that I cant figure out how to call them! Do I just do a
JNDI lookup for it, if so then what is the reference?
I have lauched the Universal Test client (in WSAD) and can browse the
JNDI tree and see ejb/Stateless2Home etc, I can also so a section
called [local EJB Beans] which expands to ejb/Stateless2Home which if
a look into it this is actually the (local) Home, but I cant figure
out what the JNDI name is?
Any help grately appreciated.
David Bevan
http://www.davidbevan.co.uk
http://www.websphereusergroup.org.uk