Marcus Ahnve wrote:
> >Does someone have a compelling argument as to why EJB *doesn't* support
> >layered architecture?
>
> It is not that that it does not support a layered architecture, it is that
> with Entity Beans it supports one specific type of layered architecture,
> namely the one with a relational database in the back
>
[Randy Stafford] I agree this is true if you use some container's
CMP implementation. However with BMP you're free to load/store/create/find
entity bean state however you want to.
> One nice idea would be to wrap this as an object that has caching,
> some sort of transactional approach towards the batch-process ...
> something like a Entity Bean on steroids, able to connect to the legacy
> system as a resource through the J2EE server.
>
> This bean would not have a primary key since the legacy system does
> not have one, the cache would be kept all day until batch-time, really
> not something where the current Entity Bean interface is suitable.
>
[Randy Stafford] <vendor> In GemStone/J you can do this, including
the transactional caching, without entity beans. You can have a domain
object that reads its state from the legacy system and gets cached in
GemStone's OODBMS (aka PCA). That domain object need not have a
PK.</vendor> So now we've taken entity beans out of the picture. Does that
mean J2EE doesn't support a layered architecture? Dunno.
JSPs/servlets/applications/applets could still be in the game for the
presentation and application layers, session beans could still be in the
game for the service layer, and your persistence layer is some kind of
legacy system interface. It's just that you choose to use domain objects
instead of the entity bean part of J2EE (specifically, EJB) for the domain
layer. All of your layers including the domain and persistence layers are
still implemented with J2EE technologies, assuming you use J2SE to implement
the domain layer and J2SE/JNI or many JMS to implement the persistence
layer.
> It's not that Entity Beans are all that bad, it is just that I do
> not find them good enough at the moment. I hope that in the future
> the current Entity Beans will be named "Relational Entity Beans", a
> subset of the more general "Entity Beans" which has a lot of pluggable
> implementations.
>
[Randy Stafford] "Relational entity beans" certainly seem to be the
commercial defacto standard CMP implementation, but I think the spec
writers' intentions were more general.
RPS
===========================================================================
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".