Let's say I have two ear file and one .jar file with an EJB that both of the EARs use. I want to do this because in some cases I might deploy one ear to an app server, but in others I might want to deploy both and I don't want to create different ear file for each scenario.
How do I best package the "client" classes for the EJB? Using JBoss I can put them pretty much anywhere and it seems to work since it has a shared classloader. But I wonder what the official way to do this is?