Examples of JmsSessionSelector


Examples of org.jboss.seam.jms.annotations.JmsSessionSelector

    }

    @Produces
    @JmsSessionSelector
    public Session getSelectedSession(InjectionPoint ip, Connection c) throws JMSException {
        JmsSessionSelector s = null;
        Iterator<Annotation> qualifiers = ip.getQualifiers().iterator();
        while (qualifiers.hasNext()) {
            Annotation qualifier = qualifiers.next();
            if (JmsSessionSelector.class.isAssignableFrom(qualifier.getClass())) {
                s = (JmsSessionSelector) qualifier;
                break;
            }
        }
        if (s == null) {
            throw new IllegalArgumentException("Injection point " + ip + " does not have @" + JmsSessionSelector.class.getSimpleName() + " qualifier");
        }
        return c.createSession(s.transacted(), s.acknowledgementMode());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.