</destination>
*/
private void createDestination2(Service service)
{
String destinationId = "MyJMSTopic";
MessageDestination destination = (MessageDestination)service.createDestination(destinationId);
ServerSettings ss = new ServerSettings();
ss.setDurable(false);
destination.setServerSettings(ss);
String adapterId = "jms";
JMSAdapter adapter = (JMSAdapter)destination.createAdapter(adapterId);
// JMS settings are set at the adapter level
JMSSettings jms = new JMSSettings();
jms.setDestinationType("Topic");
jms.setMessageType("javax.jms.TextMessage");
jms.setConnectionFactory("jms/flex/TopicConnectionFactory");
jms.setDestinationJNDIName("jms/topic/flex/simpletopic");
jms.setDeliveryMode("NON_PERSISTENT");
//jms.setMessagePriority(javax.jms.Message.DEFAULT_PRIORITY);
jms.setAcknowledgeMode("AUTO_ACKNOWLEDGE");
jms.setMaxProducers(1);
Hashtable envProps = new Hashtable();
envProps.put("Context.SECURITY_PRINCIPAL", "anonymous");
envProps.put("Context.SECURITY_CREDENTIALS", "anonymous");
envProps.put("Context.PROVIDER_URL", "http://{server.name}:1856");
envProps.put("Context.INITIAL_CONTEXT_FACTORY", "fiorano.jms.runtime.naming.FioranoInitialContextFactory");
jms.setInitialContextEnvironment(envProps);
adapter.setJMSSettings(jms);
destination.setSecurityConstraint("sample-users");
destination.addChannel("my-polling-amf");
}