// Dig into MC
Kernel kernel = bootstrap.getKernel();
// Create and Bind the EJB3 Registrar
Ejb3Registrar registrar = new Ejb3McRegistrar(bootstrap.getKernel());
Ejb3RegistrarLocator.bindRegistrar(registrar);
// Install the BeanAnnotationAdapter w/ callback to add annotation plugins on install
AddAnnotationPluginOnBeanAnnotationAdaptorCallbackService addCallbacksService = new AddAnnotationPluginOnBeanAnnotationAdaptorCallbackService(
kernel);
String addCallbacksServiceBindName = EJB3_MC_NAMESPACE + "AddCallBacksService";
registrar.bind(addCallbacksServiceBindName, addCallbacksService);
// Install our annotation plugin, will be picked up in BAA callback
String annotationPluginBindName = EJB3_MC_NAMESPACE + EjbReferenceAnnotationPlugin.class.getName();
registrar.bind(annotationPluginBindName, new EjbReferenceAnnotationPlugin(new MockEjbReferenceResolver()));
}