private void addSpecialCompBindings(final Map<String, Object> bindings) { // bind TransactionManager final TransactionManager transactionManager = SystemInstance.get().getComponent(TransactionManager.class); bindings.put("comp/TransactionManager", transactionManager); // bind TransactionSynchronizationRegistry bindings.put("comp/TransactionSynchronizationRegistry", new TransactionSynchronizationRegistryWrapper()); bindings.put("comp/ORB", new SystemComponentReference(ORB.class)); bindings.put("comp/HandleDelegate", new SystemComponentReference(HandleDelegate.class)); // bind bean validation objects bindings.put("comp/ValidatorFactory", new IntraVmJndiReference(Assembler.VALIDATOR_FACTORY_NAMING_CONTEXT + uniqueId)); bindings.put("comp/Validator", new IntraVmJndiReference(Assembler.VALIDATOR_NAMING_CONTEXT + uniqueId)); // bind UserTransaction if bean managed transactions if (beanManagedTransactions) { final UserTransaction userTransaction = new CoreUserTransaction(transactionManager); bindings.put("comp/UserTransaction", userTransaction); } }
private void addSpecialCompBindings(final Map<String, Object> bindings) { // bind TransactionManager final TransactionManager transactionManager = SystemInstance.get().getComponent(TransactionManager.class); bindings.put("comp/TransactionManager", transactionManager); // bind TransactionSynchronizationRegistry bindings.put("comp/TransactionSynchronizationRegistry", new TransactionSynchronizationRegistryWrapper()); try { bindings.put("comp/ORB", new SystemComponentReference(ParentClassLoaderFinder.Helper.get().loadClass("org.omg.CORBA.ORB"))); } catch (final NoClassDefFoundError | ClassNotFoundException e) { // no corba, who does recall what it is today anyway :D } bindings.put("comp/HandleDelegate", new SystemComponentReference(HandleDelegate.class)); // bind bean validation objects bindings.put("comp/ValidatorFactory", new IntraVmJndiReference(Assembler.VALIDATOR_FACTORY_NAMING_CONTEXT + uniqueId)); bindings.put("comp/Validator", new IntraVmJndiReference(Assembler.VALIDATOR_NAMING_CONTEXT + uniqueId)); // bind UserTransaction if bean managed transactions if (beanManagedTransactions) { final UserTransaction userTransaction = new CoreUserTransaction(transactionManager); bindings.put("comp/UserTransaction", userTransaction); } }
bindings.put("java:comp/ORB", new SystemComponentReference(ORB.class)); bindings.put("java:comp/HandleDelegate", new SystemComponentReference(HandleDelegate.class));
comp.rebind("TransactionSynchronizationRegistry", synchronizationRegistry); comp.rebind("ORB", new SystemComponentReference(ORB.class)); comp.rebind("HandleDelegate", new SystemComponentReference(HandleDelegate.class));
comp.rebind("ORB", new SystemComponentReference(TomcatJndiBuilder.class.getClassLoader().loadClass("org.omg.CORBA.ORB"))); } catch (final NoClassDefFoundError | ClassNotFoundException ncdfe) { comp.rebind("HandleDelegate", new SystemComponentReference(HandleDelegate.class));
final Class<?> orb = TomcatWebAppBuilder.class.getClassLoader().loadClass("org.omg.CORBA.ORB"); if (SystemInstance.get().getComponent(orb) != null) { safeBind(comp, "ORB", new SystemComponentReference(orb)); safeBind(comp, "HandleDelegate", new SystemComponentReference(HandleDelegate.class));
safeBind(comp, "TransactionSynchronizationRegistry", synchronizationRegistry); safeBind(comp, "ORB", new SystemComponentReference(ORB.class)); safeBind(comp, "HandleDelegate", new SystemComponentReference(HandleDelegate.class)); } catch (NamingException e) {
safeBind(comp, "TransactionSynchronizationRegistry", synchronizationRegistry); safeBind(comp, "ORB", new SystemComponentReference(ORB.class)); safeBind(comp, "HandleDelegate", new SystemComponentReference(HandleDelegate.class)); } catch (NamingException e) {