if (javaClass != null) {
final EjbJar ejbJar = new EjbJar();
final OpenejbJar openejbJar = new OpenejbJar();
final String ejbName = appModule.getModuleId() + "_" + javaClass.getName();
final ManagedBean bean = ejbJar.addEnterpriseBean(new ManagedBean(ejbName, javaClass.getName(), true));
bean.localBean();
bean.setTransactionType(TransactionType.BEAN);
final EjbDeployment ejbDeployment = openejbJar.addEjbDeployment(bean);
ejbDeployment.setDeploymentId(ejbName);
final EjbModule e = new EjbModule(ejbJar, openejbJar);
e.getProperties().setProperty("openejb.cdi.activated", "false");