If it runs without error on a J2EE certified application server it's considered compliant.
If only it were that consistant! Some app servers are "more compliant" than others, so to speak. JBoss, for example is very forgiving of not 100% compliant apps, whereas WebSphere is completely intollerant. I'd say if you can run it on more than a couple of J2EE certified app servers then it is probably compliant. Closer than that, its very hard to say (since there are other possibilities, such as IO operations in an EJB method which doesn't turn up in normal system test).