Hi,
I've been following the threads on both the EJB and the J2EE mailing lists
for
quite a while now and it seems that a lot of posting have one of the
following
subjects: "How do I access my files from EJB", "Can I use multiple threads
within
an EJB", "How can I do loggin from an EJB", and so on. The answers go from
"You can't.",
"You should not do that", "It's against the spec but if you really have to
do that,...",
and this leads me to the conclussion that something is rotten in the state
of J2EE.
It's lacking the possibility to install your own services that can be
sources of activity
(EJBs are passive components, they are being driven by external requests)
and interact
with your EJBs in a container-safe manner (EJBs are not meant to provide
such services,
they are for writing business code!). To be able to write such services we
would
need a J2EE Resource Manager SPI (service provider interface) that defines
the
interfaces between the service, the container and the rest of J2EE, so you
can
integrate theses services with transactions, security and all the other
stuff.
So when you write a J2EE Applications, you write (or buy) your EJBs (which
implement the
business logic) and your RMBs (Resource Manager Beans - which implements the
services you need, e.g. logging, file access, etc. ). Much better than
having to
work around the EJB spec all the time, I think.
(I don't know how much of what I am proposing is already included in the
J2EE Connector Architekture (JSR-16), but I think it doesn't define services
that run inside the server, just connectors to other (mostly legacy) systems
like ERPs.)
Comments? Suggestions?
Regards,
Michael
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".