Win a copy of Terraform in Action this week in the Cloud forum!

Sid Vicious

+ Follow
since Jan 05, 2001
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 Sid Vicious

What about remote access to this class? Do you keep a copy
on every server and how are these kept in sync? You could make
it an RMI class and register it that way but you might as well
use slsb's. If the system is configured correctly and code
written properly, there shouldn't be perf issues with slsb.
With respect to the synchronization, I would avoid using
it - the EJB 2.0 spec actually forbids it. Check section
23.1.2. Your apps probably will not be forward compatible.
1.) You will need to configure your DB as a data source
in the file. You can specify database
connection pooling there also. This is how the container
will know the DB.
2.) Your client will use the InitialContext to lookup your
EJB's home and then and you can find or create an EJB ref
and call the methods you have defined in it. If you are
using Haefel, he has this on pg. 178.
EJBMetadata is rarely used. It will provide you with the
Home Interface, PrimaryKey, Remote Interface and tell you
whether the bean is a session or entity bean. These values
are returned in type Class so that code generation using
reflection is possible.
Many people use the Servlet model, e.g. Client -> HTTP -> Servlet
->EJBean. I've seen some who delegate Session bean behaviour to
the Servlets because their app server supports clustering of
Servlets but not SFSession beans.
There are stubs for both the EJBObject and the EJBHome
that the client uses to call the container. To quote the
EJB spec:
"The communication stubs used on the client side are artifacts generated at the enterprise bean�s deployment time by the EJB Container provider�s tools. The stubs used on the client are specific to the wire protocol used for the remote invocation."
Basically they are saying that this will probably be determined
by the vendor you are using and I would consult their docs.
There is a SFSB (stateful session bean) there that access
the DB both via JNDI lookups on entity beans and direct JDBC