Well, One thing is whether the app server is compliant and another is how they implement the specification API's. I'd say the implementation is not the same in all app servers, otherwise there will be no competency. One CMP engine can be better in app server X than app server Y. But, they all must implement and follow the same contract stated in the
EJB specification, for example, so if you can migrate your EJB's from app server X to app server Y with minimal problems.
I'd say that if you stick to the specification you shouldn't have problems with portability, as long as the application servers are specifications-compliant.
But, many application servers add extra functionality that is beyond the J2EE specification. For instance, as far as I know, the ejb specification doesn't mandate a single way to generate primary keys. There are many
patterns that explains how to generate these keys (UUID), but there are also app servers that provide that functionality. So, if you're using that "extra" functionality and you were to migrate your EAR file to another app server that does not support that extra functionality, you will run into trouble.
Application servers also used proprietary xml configuration file (jboss.xml, weblogic.xml -not sure about this one-), etc. So you will eventually have to do minor changes to your descriptor. It's not as easy as moving the EAR file to another app server.
My $0.02
[ August 11, 2003: Message edited by: Andres Gonzalez ]