/** * Adds the given resource to the list of bindings. * @param jAnnotationResource the given resource. */ protected void addResource(final IJAnnotationResource jAnnotationResource, final ISharedMetadata commonMetadata) { // Check Managed Beans if (jAnnotationResource.getLookup() == null) { for (ICommonClassMetadata<?, ?, ?> iCommonClassMetadata : this.getClassMetadataCollection()) { if (jAnnotationResource.getType() != null && iCommonClassMetadata.getJClass().getName().equals(jAnnotationResource.getType().replace(".", "/"))) { String managedBeanName = iCommonClassMetadata.getManagedBeanName(); if (managedBeanName != null) { // Add a lookup to the ManagedBean jAnnotationResource.setLookup("java:module/".concat(managedBeanName)); } } } } this.bindingHolder.addResourceBinding(new ENCBinding<IJAnnotationResource>(jAnnotationResource.getName(), jAnnotationResource)); addFieldOrMethodENC(jAnnotationResource.getName(), commonMetadata); }
if ("javax.ejb.SessionContext".equals(annotationResource.getType())) { continue; } else if ("org.omg.CORBA.ORB".equals(annotationResource.getType())) { continue; } else if ("javax.transaction.UserTransaction".equals(annotationResource.getType())) { continue; String messageDestinationLink = annotationResource.getMessageDestinationLink(); Resource.AuthenticationType authType = annotationResource.getAuthenticationType(); if (authType.equals(Resource.AuthenticationType.CONTAINER)) { resourceRef.setResAuth("Container"); resourceRef.setResType(annotationResource.getType()); String mappedName = annotationResource.getMappedName(); if (mappedName != null) { JonasResource jonasResource = new JonasResource(); jonasResource.setResRefName(annotationResource.getName()); jonasResource.setJndiName(mappedName); jonasClient.addJonasResource(jonasResource); messageDestinationRef.setMessageDestinationType(annotationResource.getType()); String mappedName = annotationResource.getMappedName(); if (mappedName != null) { JonasMessageDestination jonasMessageDestination = new JonasMessageDestination(); jonasMessageDestination.setMessageDestinationName(annotationResource.getName()); jonasMessageDestination.setJndiName(mappedName);
String type = annotationResource.getType(); String messageDestinationLink = annotationResource.getMessageDestinationLink(); AuthenticationType authType = annotationResource.getAuthenticationType(); if (authType.equals(AuthenticationType.CONTAINER)) { resourceRef.setResAuth("Container"); String mappedName = annotationResource.getMappedName(); jonasResource.setResRefName(annotationResource.getName()); jonasResource.setJndiName(mappedName); jonasWebApp.addJonasResource(jonasResource); messageDestinationRef.setMessageDestinationType(annotationResource.getType()); String mappedName = annotationResource.getMappedName(); if (mappedName != null) { JonasMessageDestination jonasMessageDestination = new JonasMessageDestination(); jonasMessageDestination.setMessageDestinationName(annotationResource.getName()); jonasMessageDestination.setJndiName(mappedName); jonasWebApp.addJonasMessageDestination(jonasMessageDestination);
/** * Adds the given resource to the list of bindings. * @param jAnnotationResource the given resource. */ protected void addResource(final IJAnnotationResource jAnnotationResource, final ISharedMetadata commonMetadata) { // Check Managed Beans if (jAnnotationResource.getLookup() == null) { for (ICommonClassMetadata<?, ?, ?> iCommonClassMetadata : this.getClassMetadataCollection()) { if (jAnnotationResource.getType() != null && iCommonClassMetadata.getJClass().getName().equals(jAnnotationResource.getType().replace(".", "/"))) { String managedBeanName = iCommonClassMetadata.getManagedBeanName(); if (managedBeanName != null) { // Add a lookup to the ManagedBean jAnnotationResource.setLookup("java:module/".concat(managedBeanName)); } } } } this.bindingHolder.addResourceBinding(new ENCBinding<IJAnnotationResource>(jAnnotationResource.getName(), jAnnotationResource)); addFieldOrMethodENC(jAnnotationResource.getName(), commonMetadata); }