use of com.sun.enterprise.deployment.InjectionTarget in project Payara by payara.
the class EjbDescriptor method addEjbReferenceDescriptor.
/**
* Adds a reference to another ejb to me.
* @param ejbReference
*/
@Override
public final void addEjbReferenceDescriptor(EjbReference ejbReference) {
try {
EjbReference existing = getEjbReference(ejbReference.getName());
for (InjectionTarget next : ejbReference.getInjectionTargets()) {
existing.addInjectionTarget(next);
}
} catch (IllegalArgumentException e) {
if (env != null)
env.addEjbReferenceDescriptor(ejbReference);
else
ejbReferences.add(ejbReference);
ejbReference.setReferringBundleDescriptor(getEjbBundleDescriptor());
}
}
use of com.sun.enterprise.deployment.InjectionTarget in project Payara by payara.
the class EjbDescriptor method addResourceEnvReferenceDescriptor.
@Override
public final void addResourceEnvReferenceDescriptor(ResourceEnvReferenceDescriptor resourceEnvReference) {
try {
ResourceEnvReferenceDescriptor existing = getResourceEnvReferenceByName(resourceEnvReference.getName());
for (InjectionTarget next : resourceEnvReference.getInjectionTargets()) {
existing.addInjectionTarget(next);
}
} catch (IllegalArgumentException e) {
if (env != null)
env.addResourceEnvReferenceDescriptor(resourceEnvReference);
else
resourceEnvReferences.add(resourceEnvReference);
}
}
use of com.sun.enterprise.deployment.InjectionTarget in project Payara by payara.
the class EjbDescriptor method addResourceReferenceDescriptor.
/**
* Adds a resource reference to me.
* @param resourceReference
*/
@Override
public final void addResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference) {
try {
ResourceReferenceDescriptor existing = getResourceReferenceByName(resourceReference.getName());
for (InjectionTarget next : resourceReference.getInjectionTargets()) {
existing.addInjectionTarget(next);
}
} catch (IllegalArgumentException e) {
if (env != null)
env.addResourceReferenceDescriptor(resourceReference);
else
resourceReferences.add(resourceReference);
}
}
use of com.sun.enterprise.deployment.InjectionTarget in project Payara by payara.
the class EjbDescriptor method addMessageDestinationReferenceDescriptor.
@Override
public final void addMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor messageDestRef) {
try {
MessageDestinationReferenceDescriptor existing = getMessageDestinationReferenceByName(messageDestRef.getName());
for (InjectionTarget next : messageDestRef.getInjectionTargets()) {
existing.addInjectionTarget(next);
}
} catch (IllegalArgumentException e) {
if (env != null)
env.addMessageDestinationReferenceDescriptor(messageDestRef);
else
messageDestReferences.add(messageDestRef);
if (getEjbBundleDescriptor() != null) {
messageDestRef.setReferringBundleDescriptor(getEjbBundleDescriptor());
}
}
}
use of com.sun.enterprise.deployment.InjectionTarget in project Payara by payara.
the class EjbDescriptor method addServiceReferenceDescriptor.
@Override
public final void addServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef) {
try {
ServiceReferenceDescriptor existing = this.getServiceReferenceByName(serviceRef.getName());
for (InjectionTarget next : serviceRef.getInjectionTargets()) {
existing.addInjectionTarget(next);
}
} catch (IllegalArgumentException e) {
if (env != null)
env.addServiceReferenceDescriptor(serviceRef);
else
serviceReferences.add(serviceRef);
serviceRef.setBundleDescriptor(getEjbBundleDescriptor());
}
}
Aggregations