{
m_nAckMode = Session.DUPS_OK_ACKNOWLEDGE;
}
else
{
throw new InvalidPropertyException("Invalid acknowledgement mode \"" + m_sAckMode +
"\" (expected \"Auto-acknowledge\" or \"Dups-ok-acknowledge\")");
}
if (m_sDurability == null || m_sDurability.equals("NonDurable"))
{
m_bDurable = false;
}
else if (m_sDurability.equals("Durable"))
{
m_bDurable = true;
}
else
{
throw new InvalidPropertyException("Invalid subscription durability \"" + m_sDurability +
"\" (expected \"Durable\" or \"NonDurable\")");
}
if (m_sDestinationType == null || m_sDestinationType.equals("javax.jms.Queue"))
{
m_bBroadcast = false;
if (m_bDurable)
{
throw new InvalidPropertyException("Destination type \"" +
m_sDestinationType + "\" cannot be durable");
}
}
else if (m_sDestinationType.equals("javax.jms.Topic"))
{
m_bBroadcast = true;
}
else
{
throw new InvalidPropertyException("Invalid destination type \"" + m_sDestinationType +
"\" (expected \"javax.jms.Queue\" or \"javax.jms.Topic\")");
}
if (m_sDestination == null)
{
throw new InvalidPropertyException("Missing destination name");
}
if (m_sConnectionFactory == null)
{
throw new InvalidPropertyException("Missing connection factory name");
}
if (m_sConnectionFactoryProperties != null && m_sConnectionFactoryProperties.trim().length() != 0)
{
try
{
m_connectionFactoryProperties = PropertyUtil.fromString(m_sConnectionFactoryProperties);
}
catch (IOException e)
{
throw new InvalidPropertyException("Invalid connection factory properties syntax", e);
}
}
else
{
m_connectionFactoryProperties = null;
}
if (m_sDestinationProperties != null && m_sDestinationProperties.trim().length() != 0)
{
try
{
m_destinationProperties = PropertyUtil.fromString(m_sDestinationProperties);
}
catch (IOException e)
{
throw new InvalidPropertyException("Invalid destination properties syntax", e);
}
}
else
{
m_destinationProperties = null;
}
if (m_lSelectorUpdateInterval <= 0)
{
throw new InvalidPropertyException("Invalid message selector update value");
}
}