Re: JMS, RMI and synchronous request-response
I am still learning about some of this stuff, as I am new to java. EJB
seems to me to be a large collection of API specifications. Which part
did yoy have in mind?
It is a standard so it is documented.
There are several types of EJB:
- session bean
- entity bean
- message driven bean
It is session bean that is relevant for you.
I see there is a part for remote procedure calls
using RMI-IIOP. Is that what you meant?
That is just the transport. Unless you want to write your own server,
then you will not care.
I am reluctant to jump into EJB since it seems to have a record of
being overly complex. There are tales of other developers being
reluctant for the same reason.
But most of it is just bullshit.
EJB's are not complex.
For session beans:
You write 1 or 2 interfaces a class implementing those and put some
annotations on it.
That is about it.
For EJB versions before 3 you needed to write 2 or 4 interfaces
and for some bizarre reason the implementation class should only
implement the methods but not formally the interface. And the
stuff in annotations where in a XML file instead.
Not really a big deal.
And most IDE's have excellent tools support for it.
EJB's comes with a bunch of services: transactions, security,
If you don't need any of those, then you don't need an
That could be called heavyweight.
Spring is an example of a lightweight
framework developed as an alternative to EJB complexity. It seems much
more popular to me than EJB.
Spring and EJB are not mutually exclusive.
And it will take you a lot longer to learn everything in Spring
than to learn EJB's.
But there are some useful pieces in Spring - no doubt about that.