public void testMixedEjbJars() throws Exception
{
// ejb1.jar
JavaArchive ejbJar1 = createEjbJar("ejb1.jar", true, PlainJavaBean.class);
DeploymentUnit unit = assertDeploy(ejbJar1);
Class<?> plainJavaBeanClass = getClass(PlainJavaBean.class, unit);
Deployment deployment1 = initializeDeploymentBean(unit);
// ejb2.jar
JavaArchive ejbJar2 = createEjbJar("ejb2.jar", false, MySLSBean.class, BusinessInterface.class);
unit = assertDeploy(ejbJar2);
ClassLoader classLoader2 = unit.getClassLoader();
Class<?> mySLSBeanClass = classLoader2.loadClass(MySLSBean.class.getName());
Class<?> businessInterface = classLoader2.loadClass(BusinessInterface.class.getName());
BeanDeploymentArchive bda1 = deployment1.getBeanDeploymentArchives().iterator().next();
assertSame(bda1, deployment1.loadBeanDeploymentArchive(plainJavaBeanClass));