Methods Summary |
---|
private void | callSetters(java.util.HashMap cfConfig, java.lang.Class factoryClass, javax.jms.ConnectionFactory factory)
BeanPropertyDescriptor[] bpd = BeanUtils.getPd(factoryClass);
for(int i = 0; i < bpd.length; i++)
{
BeanPropertyDescriptor thisBPD = bpd[i];
String propName = thisBPD.getName();
if(cfConfig.containsKey(propName))
{
Object value = cfConfig.get(propName);
if(value == null)
continue;
String validType = thisBPD.getType().getName();
if(!value.getClass().getName().equals(validType))
throw new IllegalArgumentException("badType");
if(!thisBPD.isWriteable())
throw new IllegalArgumentException("notWriteable");
if(thisBPD.isIndexed())
throw new IllegalArgumentException("noIndexedSupport");
thisBPD.set(factory, value);
}
}
|
private javax.jms.ConnectionFactory | getConnectionFactory(java.util.HashMap cfConfig)
String classname = (String)cfConfig.get(CONNECTION_FACTORY_CLASS);
if(classname == null || classname.trim().length() == 0)
throw new IllegalArgumentException("noCFClass");
Class factoryClass = ClassUtils.forName(classname);
ConnectionFactory factory = (ConnectionFactory)factoryClass.newInstance();
callSetters(cfConfig, factoryClass, factory);
return factory;
|
public javax.jms.QueueConnectionFactory | getQueueConnectionFactory(java.util.HashMap cfConfig)
return (QueueConnectionFactory)getConnectionFactory(cfConfig);
|
public javax.jms.TopicConnectionFactory | getTopicConnectionFactory(java.util.HashMap cfConfig)
return (TopicConnectionFactory)getConnectionFactory(cfConfig);
|