objectDescriptor.setClassName(JmsMessageSession.class.getName());
objectDescriptor.addInjection("dbSession", new ContextTypeRefDescriptor(DbSession.class));
if (element.hasAttribute("session-jndi")) {
String jmsSessionJndiName = element.getAttribute("session-jndi");
JndiDescriptor jndiDescriptor = new JndiDescriptor(jmsSessionJndiName);
objectDescriptor.addInjection("jmsSession", jndiDescriptor);
} else {
parse.addProblem("attribute <"+XmlUtil.getTagLocalName(element)+" session-jndi=\"...\" is required when target=\"jms\"", element);
}
if (element.hasAttribute("destination-jndi")) {
String jmsDestinationJndiName = element.getAttribute("destination-jndi");
JndiDescriptor jndiDescriptor = new JndiDescriptor(jmsDestinationJndiName);
objectDescriptor.addInjection("jmsDestination", jndiDescriptor);
} else {
parse.addProblem("attribute <"+XmlUtil.getTagLocalName(element)+" destination-jndi=\"...\" is required when target=\"jms\"", element);
}