Search in sources :

Example 6 with JMSDestinationDefinitionDescriptor

use of com.sun.enterprise.deployment.JMSDestinationDefinitionDescriptor in project Payara by payara.

the class ActiveJmsResourceAdapter method getJMSDestination.

/*
     * Get JMS destination resource from deployed applications
     */
private JMSDestinationDefinitionDescriptor getJMSDestination(String logicalDestination) {
    Domain domain = Globals.get(Domain.class);
    Applications applications = domain.getApplications();
    for (com.sun.enterprise.config.serverbeans.Application app : applications.getApplications()) {
        ApplicationInfo appInfo = appRegistry.get(app.getName());
        if (appInfo != null) {
            Application application = appInfo.getMetaData(Application.class);
            JMSDestinationDefinitionDescriptor destination = getJMSDestination(logicalDestination, application);
            if (isValidDestination(destination)) {
                return destination;
            }
        }
    }
    return null;
}
Also used : Applications(com.sun.enterprise.config.serverbeans.Applications) JMSDestinationDefinitionDescriptor(com.sun.enterprise.deployment.JMSDestinationDefinitionDescriptor) ApplicationInfo(org.glassfish.internal.data.ApplicationInfo) Domain(com.sun.enterprise.config.serverbeans.Domain) Application(com.sun.enterprise.deployment.Application)

Example 7 with JMSDestinationDefinitionDescriptor

use of com.sun.enterprise.deployment.JMSDestinationDefinitionDescriptor in project Payara by payara.

the class ActiveJmsResourceAdapter method getJMSDestination.

/*
     * Get JMS destination resource from ejb module
     */
private JMSDestinationDefinitionDescriptor getJMSDestination(String logicalDestination, EjbBundleDescriptor ejbBundleDescriptor) {
    JMSDestinationDefinitionDescriptor destination = getJMSDestination(logicalDestination, ejbBundleDescriptor.getResourceDescriptors(JavaEEResourceType.JMSDD));
    if (isValidDestination(destination)) {
        return destination;
    }
    Set<EjbDescriptor> ejbDescriptors = (Set<EjbDescriptor>) ejbBundleDescriptor.getEjbs();
    for (EjbDescriptor ejbDescriptor : ejbDescriptors) {
        destination = getJMSDestination(logicalDestination, ejbDescriptor.getResourceDescriptors(JavaEEResourceType.JMSDD));
        if (isValidDestination(destination)) {
            return destination;
        }
    }
    return null;
}
Also used : Set(java.util.Set) HashSet(java.util.HashSet) JMSDestinationDefinitionDescriptor(com.sun.enterprise.deployment.JMSDestinationDefinitionDescriptor) EjbDescriptor(com.sun.enterprise.deployment.EjbDescriptor)

Aggregations

JMSDestinationDefinitionDescriptor (com.sun.enterprise.deployment.JMSDestinationDefinitionDescriptor)7 EjbBundleDescriptor (com.sun.enterprise.deployment.EjbBundleDescriptor)2 WebBundleDescriptor (com.sun.enterprise.deployment.WebBundleDescriptor)2 ConnectorRuntimeException (com.sun.appserv.connectors.internal.api.ConnectorRuntimeException)1 Applications (com.sun.enterprise.config.serverbeans.Applications)1 Domain (com.sun.enterprise.config.serverbeans.Domain)1 Application (com.sun.enterprise.deployment.Application)1 ApplicationClientDescriptor (com.sun.enterprise.deployment.ApplicationClientDescriptor)1 EjbDescriptor (com.sun.enterprise.deployment.EjbDescriptor)1 EnvironmentProperty (com.sun.enterprise.deployment.EnvironmentProperty)1 MessageDestinationDescriptor (com.sun.enterprise.deployment.MessageDestinationDescriptor)1 URISyntaxException (java.net.URISyntaxException)1 PrivilegedActionException (java.security.PrivilegedActionException)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 ExecutionException (java.util.concurrent.ExecutionException)1 ResourceAdapterInternalException (javax.resource.spi.ResourceAdapterInternalException)1 AdminObjectResource (org.glassfish.connectors.config.AdminObjectResource)1 MultiException (org.glassfish.hk2.api.MultiException)1 ApplicationInfo (org.glassfish.internal.data.ApplicationInfo)1