/* */ }
/* */
/* */ public void inject(InjectionContainer container)
/* */ {
/* 72 */ String error1 = this.error;
/* 73 */ ManagedEntityManagerFactory factory = null;
/* */ try
/* */ {
/* 76 */ factory = PersistenceUnitHandler.getManagedEntityManagerFactory(container, this.unitName);
/* */ }
/* */ catch (NameNotFoundException e)
/* */ {
/* 81 */ error1 = error1 + " " + e.getMessage();
/* */ }
/* 83 */ if (factory == null)
/* */ {
/* 85 */ throw new RuntimeException(error1);
/* */ }
/* 87 */ if (this.type == PersistenceContextType.EXTENDED)
/* */ {
/* 89 */ if (!(container instanceof StatefulContainer))
/* 90 */ throw new RuntimeException("It is illegal to inject an EXTENDED PC into something other than a SFSB");
/* 91 */ container.getInjectors().add(0, new ExtendedPersistenceContextInjector(factory));
/* */ Object extendedPc;
/* */ Object extendedPc;
/* 93 */ if ((this.injectionType == null) || (this.injectionType.getName().equals(EntityManager.class.getName())))
/* */ {
/* 96 */ extendedPc = new ExtendedEntityManager(factory.getKernelName());
/* */ }
/* */ else
/* */ {
/* 100 */ ExtendedSessionInvocationHandler handler = new ExtendedSessionInvocationHandler(factory.getKernelName());
/* 101 */ extendedPc = Proxy.newProxyInstance(org.hibernate.Session.class.getClassLoader(), SESS_PROXY_INTERFACES, handler);
/* */ }
/* */
/* */ try
/* */ {