Is it possible to achieve ContainerIndependence with EnterpriseJavaBeans applications or components? What are the issues? ---- '''Container-Managed Persistence Issues''' Be aware that there really isn't any useful standardisation on how an EJB container should do container-managed persistence (CMP). The way everyone wants is through a rich object-relational mapping. Most products do this to some extent, but not all. And, of course, they all do it in different ways. Unfortunately this critical hole in the standard pretty much kills any drop-beans-in-and-out interoperability between the different vendors. Also, for the products that ''do'' have a good object-relational mapping story, watch out for which databases they support. You'd think they'd support any database with a JDBC-compliant driver, right? No. Because of all the metadata access that the mapping code has to do, the O/R support turns out to be very database-specific. So be careful if you were planning to map your legacy DB into entity beans or something like that. Not everyone needs good O/R CMP, so maybe this won't be a problem for you. But it's certainly become the central issue in our evaluation of the various products out there. ''--RichardEmerson'' ----- As a f'r instance on the last point. WebSphere and VisualAge do pretty sophisticated O/R mapping for CMP beans (we do both inheritance and composition of Entity EJB's with multiple mappings to different tables). As a result of this sophistication, we can only support two databases -- Oracle and DB2. We're adding more, but slowly, slowly... Of course, if you want to do the O/R thing yourself or use another commercial O/R tool, BMP is available for any database :) KyleBrown Ok, well having spent more time with VisualAge and WebSphere, I can say that the Sybase handling ''may be'' sufficient to let you develop Entity EJBs against your existing Sybase schema, and persist them in there too. You ''might'' have to work around quite a few issues, especially in the IDE's EJB test environment (it requires DB2 or Oracle as well), but you ''can almost certainly'' do this now. However as I understand it, there is no ''official'' support for this facility from IBM. Hence the italics. --RichardEmerson ----- This is a trade-off I'm trying to capture right now in my latest work on the Container Independence and Container/Component Managed Persistence patterns. Whether it's EJB or XML or Jini or another future technology, it's likely that initially decision makers will need to address that different containers may address the trade-off between sophistication and interoperability in its own way. In addition, this trade-off changes over time, since things like J2EE and subsequent maturity help bridge the gap. --PhilipEskelin ---- CategoryEjb