/* */ protected ServiceContainer getServiceContainer(int ejbIndex)
/* */ throws Exception
/* */ {
/* 516 */ String ejbName = (String)this.ejbNames.get(ejbIndex);
/* */
/* 518 */ JBossServiceBeanMetaData service = (JBossServiceBeanMetaData)this.ejbs.get(ejbIndex);
/* */
/* 520 */ ServiceContainer container = super.getServiceContainer(ejbIndex);
/* 521 */ ServiceImpl annotation = new ServiceImpl((Service)container.resolveAnnotation(Service.class));
/* */
/* 524 */ container.setAssemblyDescriptor(this.dd.getAssemblyDescriptor());
/* */
/* 526 */ if ((service != null) && (!isAnnotatedBean()))
/* */ {
/* 528 */ if (service.getObjectName() != null)
/* 529 */ annotation.setObjectName(service.getObjectName());
/* 530 */ if (service.getEjbName() != null)
/* 531 */ annotation.setName(service.getEjbName());
/* 532 */ if (service.getXmbean() != null)
/* 533 */ annotation.setXMBean(service.getXmbean());
/* 534 */ addClassAnnotation(container, Service.class, annotation);
/* */ }
/* */
/* 537 */ addInterfaces(container, service);
/* */