ObjectName applicationObjectName = NameFactory.getApplicationName(null, null, null, j2eeContext);
if (!j2eeContext.getJ2eeApplicationName().equals("null")) {
assertRunning(kernel, applicationObjectName);
} else {
Set applications = kernel.listGBeans(applicationObjectName);
assertTrue("No application object should be registered for a standalone module", applications.isEmpty());
}
ObjectName moduleName = NameFactory.getModuleName(null, null, null, NameFactory.RESOURCE_ADAPTER_MODULE, null, j2eeContext);
assertRunning(kernel, moduleName);