private static List<String> getAllContracts(ActiveDescriptor<?> desc) { LinkedList<String> allContracts = new LinkedList<String>(desc.getAdvertisedContracts()); allContracts.addAll(desc.getQualifiers()); String scope = (desc.getScope() == null) ? PerLookup.class.getName() : desc.getScope() ; allContracts.add(scope); return allContracts; }
private static List<String> getAllContracts(ActiveDescriptor<?> desc) { LinkedList<String> allContracts = new LinkedList<String>(desc.getAdvertisedContracts()); allContracts.addAll(desc.getQualifiers()); String scope = (desc.getScope() == null) ? PerLookup.class.getName() : desc.getScope() ; allContracts.add(scope); return allContracts; }
private static List<String> getAllContracts(ActiveDescriptor<?> desc) { LinkedList<String> allContracts = new LinkedList<String>(desc.getAdvertisedContracts()); allContracts.addAll(desc.getQualifiers()); String scope = (desc.getScope() == null) ? PerLookup.class.getName() : desc.getScope() ; allContracts.add(scope); return allContracts; }
private static List<String> getAllContracts(ActiveDescriptor<?> desc) { LinkedList<String> allContracts = new LinkedList<String>(desc.getAdvertisedContracts()); allContracts.addAll(desc.getQualifiers()); String scope = (desc.getScope() == null) ? PerLookup.class.getName() : desc.getScope() ; allContracts.add(scope); return allContracts; }
@SuppressWarnings("unchecked") @Override public void shutdown() { List<ActiveDescriptor<?>> all = locator.getDescriptors(BuilderHelper.allFilter()); long myLocatorId = locator.getLocatorId(); TreeSet<SystemDescriptor<Object>> singlesOnly = new TreeSet<SystemDescriptor<Object>>( new GenerationComparator()); for (ActiveDescriptor<?> one : all) { if (one.getScope() == null || !one.getScope().equals(Singleton.class.getName())) continue; synchronized (this) { if (one.getCache() == null) continue; } if (one.getLocatorId() == null || one.getLocatorId().longValue() != myLocatorId) continue; SystemDescriptor<Object> oneAsObject = (SystemDescriptor<Object>) one; singlesOnly.add(oneAsObject); } for (SystemDescriptor<Object> one : singlesOnly) { destroyOne(one); } }
@SuppressWarnings("unchecked") @Override public void shutdown() { List<ActiveDescriptor<?>> all = locator.getDescriptors(BuilderHelper.allFilter()); long myLocatorId = locator.getLocatorId(); TreeSet<SystemDescriptor<Object>> singlesOnly = new TreeSet<SystemDescriptor<Object>>( new GenerationComparator()); for (ActiveDescriptor<?> one : all) { if (one.getScope() == null || !one.getScope().equals(Singleton.class.getName())) continue; synchronized (this) { if (one.getCache() == null) continue; } if (one.getLocatorId() == null || one.getLocatorId().longValue() != myLocatorId) continue; SystemDescriptor<Object> oneAsObject = (SystemDescriptor<Object>) one; singlesOnly.add(oneAsObject); } for (SystemDescriptor<Object> one : singlesOnly) { destroyOne(one); } }
@SuppressWarnings("unchecked") @Override public void shutdown() { List<ActiveDescriptor<?>> all = locator.getDescriptors(BuilderHelper.allFilter()); long myLocatorId = locator.getLocatorId(); TreeSet<SystemDescriptor<Object>> singlesOnly = new TreeSet<SystemDescriptor<Object>>( new GenerationComparator()); for (ActiveDescriptor<?> one : all) { if (one.getScope() == null || !one.getScope().equals(Singleton.class.getName())) continue; synchronized (this) { if (one.getCache() == null) continue; } if (one.getLocatorId() == null || one.getLocatorId().longValue() != myLocatorId) continue; SystemDescriptor<Object> oneAsObject = (SystemDescriptor<Object>) one; singlesOnly.add(oneAsObject); } for (SystemDescriptor<Object> one : singlesOnly) { destroyOne(one); } }
@SuppressWarnings("unchecked") @Override public void shutdown() { List<ActiveDescriptor<?>> all = locator.getDescriptors(BuilderHelper.allFilter()); long myLocatorId = locator.getLocatorId(); TreeSet<SystemDescriptor<Object>> singlesOnly = new TreeSet<SystemDescriptor<Object>>( new GenerationComparator()); for (ActiveDescriptor<?> one : all) { if (one.getScope() == null || !one.getScope().equals(Singleton.class.getName())) continue; synchronized (this) { if (one.getCache() == null) continue; } if (one.getLocatorId() == null || one.getLocatorId().longValue() != myLocatorId) continue; SystemDescriptor<Object> oneAsObject = (SystemDescriptor<Object>) one; singlesOnly.add(oneAsObject); } for (SystemDescriptor<Object> one : singlesOnly) { destroyOne(one); } }
if (!childService.getScope().equals(RunLevel.class.getName())) continue;
new JpaPersistenceContextKey(factoryName, unitName, properties), EntityManager.class, injectee.getInjecteeDescriptor().getScope()); return entityManager;
@Override public Object resolve(Injectee injectee, ServiceHandle<?> root) { final String factoryName = ReflectionHelper.getNameFromAllQualifiers( injectee.getRequiredQualifiers(), injectee.getParent()); final ConnectionSource connectionSource = persistenceSessionManager.get().getPersistenceContext( new PersistenceContextKey(new PersistenceContextFactoryKey(factoryName)), ConnectionSource.class, injectee.getInjecteeDescriptor().getScope()); return connectionSource; }
" in scope " + root.getScope() + " an error occured while creating the proxy");
" in scope " + root.getScope() + " an error occured while creating the proxy");
" in scope " + root.getScope() + " an error occured while creating the proxy");
" in scope " + root.getScope() + " an error occured while creating the proxy");
this.contract = contract; addAdvertisedContract(contract); super.setScope(descriptor.getScope()); super.addMetadata(ALIAS_METADATA_MARKER, getAliasMetadataValue(descriptor));
this.contract = contract; addAdvertisedContract(contract); super.setScope(descriptor.getScope()); super.addMetadata(ALIAS_METADATA_MARKER, getAliasMetadataValue(descriptor));
this.contract = contract; addAdvertisedContract(contract); super.setScope(descriptor.getScope()); super.addMetadata(ALIAS_METADATA_MARKER, getAliasMetadataValue(descriptor));
this.contract = contract; addAdvertisedContract(contract); super.setScope(descriptor.getScope()); super.addMetadata(ALIAS_METADATA_MARKER, getAliasMetadataValue(descriptor));